O'Reilly logo

Ubuntu Unleashed 2013 Edition: Covering 12.10 and 13.04, Eighth Edition by Matthew Helmke

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using rsync

An old favorite for backing up is rsync. One big reason for this is because rsync enables you to copy only those files that have changed since the last backup. So although the initial backup might take a long time, subsequent backups are much faster. It is also highly configurable and can be used with removable media such as USB hard drives or over a network. Here is one way to use rsync.

First, create an empty file and call it backup.sh:

matthew@seymour:~$ sudo touch backup.sh

Then, using your favorite text editor, enter the following command into the file and save it:

sudo rsync --force --ignore-errors --delete --delete-excluded --exclude-from=/home/matthew-exclude.txt --backup --backup-dir=`date +%Y-%m-%d` -av //media/externaldrive/backup/Seymour ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required