Advanced backup tools that keep multiple copies of files and so on have their place, but sometimes you just need a simple scheduled sync, not a full backup. For example, I have an SD card that stays in my laptop almost all the time. On this, I keep a copy of most of my home folder that gets updated every day at 1:30 in the morning. I no longer have to think about it, it just happens. Here’s how you can do the same thing:
- Install GRsync and gnome-schedule. In Ubuntu, you can install GRsync from Add/Remove programs, but gnome-schedule is only available from Synaptic.
- Open GRsync and create a new session. Choose the source folder location in the first box and the target folder in the second box. Then you can configure the options below. You will almost certainly want the “delete on destination” option. I have also selected “preserve time,” “preserve permissions,” “verbose,” “show progress,” and “Windows compatibility.”
- Move on to the advanced options tab. The most important part here is the “additional options” section. Here you can specify anything else you want to pass to rsync, the backend program that actually does the file transfer. The most useful argument you can supply is –exclude=”something”. For example, I have entered this:
–exclude=’*.iso’ –exclude=’.VirtualBox’ –exclude=’.miro’ –exclude=”.nautilus” –exclude=”.Trash”
This tells rsync to ignore any file with the extension .iso, skip the VirtualBox, Miro, and Nautilus folders, and skip the trash. If your target directory is a USB hard drive, you may not have to worry about this, but my SD card can’t fit everything, so I don’t copy some of the less important stuff.
- Press “Execute” and make sure everything works.
- Open Gnome Schedule (in Ubuntu, you can find it under System > Preferences > Scheduled Tasks. Click on new and create a recurring task. Enter whatever you want for a description and choose when you want to backup to run. Finally, enter this as the command:
grsync -e “name of session”
- That’s it!
As a bonus, if you want to be able to easily check to make sure your backup ran, create a blank text document somewhere. Then open a new black document and type this in:
grsync -e “session name“;
touch test file location;
Save this as something.sh. Then go back in to Gnome Schedule and change the command to ./filename.sh. Remember that the command is run in the home directory, so if the script is in /home/username/files/scripts/script.sh, you have to say ./files/scripts/script.sh.
Now after every time the backup is run, the test file you created will be updated to say it was last modified at the current time.
Now you lost your excuse. Go back up!
- Newbie’s Guide 1.0 Why Linux? 2.0 Getting a Computer 2.1 Live CD’s...
- Adobe Air On Linux: What, Why, And How Adobe Air is a technology that allows certain web applications...
- Remotely Accessing Your Linux Computer: Part 1 This is the first part in a four part series...
- Tricks for Installing and Configuring a Local LAMP Sever LAMP stands for Linux, Apache, MySQL, and PHP, which represents...