As I get more paranoid about losing the work I’ve been doing. I’ve adopted the extra precaution of putting a backup of my most important work in my pocket whenever I walk out of the door. This way I’ve got my latest work off the premises and I’ve covered that crucial period since the most recent nightly backup.
I simply use a USB memory key which is encrypted, so should I lose it it can’t be read, and a program called duplicity to create incremental backups.
Making the backup
The backups I do by mounting the USB drive, entering the encryption key and using the following command:
$ duplicity --no-encryption /home/rcm/my-important-data/ file:///media/memory-key/duplicity
In no time at all I’m ready to go. If I run out of space, due to too many incremental files, then I simply clear the existing duplicity directory and start a new backup. (This is safe as long as my nightly backup is doing its job.)
Getting it back
Luckily I’ve never needed to use the files, but I do test it now and then. So mount the USB drive again and make it accessible by entering the encryption key.
To see what backups this drive contains, use
$ duplicity collection-status file:///media/memory-key/duplicity/
$ duplicity list-current-files file:///media/memory-key/duplicity/ | less
To restore it (to a temporary directory), use
$ cd /tmp $ duplicity --no-encryption restore file:///media/memory-key/duplicity/ restore-test
A quick diff will indicate how well it has worked, using
$ diff -qr restore-test /home/rcm/my-important-data
should show any files changed since the backup was made. (An alternative is to use the graphical program meld to navigate the differences.)