# backup script

Recently I made a backup script with python2.7, and it worked fine by now. So I think it might be a good idea to share it here.

# Install megaFuse

The first thing you need to do is to install megaFuse

## Run MegaFuse at system boot

Save the following code as a bash file, e.g. start_mega.sh. Then run the file automatically every time the OS boots by using Startup Applications on ubuntu, note that you should modify /path/to/MegaFuse to the correct one

Why do you need sleep 100? I don’t know either. I tried to add the line /path/to/MegaFuse -c /path/to/megafuse.conf -f -o allow_other -o uid=1000 in the file /etc/rc.local before, but it failed. I don’t know why. And it almost caused my PC fail to boot because it output way too many errors in /var/log/syslog file. Finally I decided to put it in Startup Applications. Notice that I used sudo here, and you have to put your password in plaintext. This is a security risk. But I don’t know to make it work without it, because you need to have root permission to mount it. If you know how to work without sudo, I’d like to hear your opinion.

# MegaTools

You also need MegaTools to run this script, I put the tools in /usr/local/bin/ to make it work.

# my python backup script

My backup script was written with python. But I think maybe bash script would be easier. Anyway, this is my backup file

# run the backup script every day at 5:00pm

run crontab -e, add the following line

Share