Off site copy
Having your backup disk at home protects you against data loss in case of disk failure. Should your house burn down, your backup disk would not help much.
If burglars pay you a visit and take your computer, they may just as well take all your electronic equipment as well, including your backup copy.
The solution is of course to keep your backup copy (or a copy of your backup copy) outside your home.
In my home backup implementation, I use two identical external disks. One disk stays at home for a month and takes periodical backups (weekly or daily), while the other one is locked at work.
Once in a month, I swap the home disk with the work disk.
If the disk that I currently have at home gets destroyed or stolen with my computer, I still have the data that I had at the latest disk swap.
Periodical backupThe primary failure of my previous backup (copy and forget) is that it was manual. Several months could go by between copying to my external disk. This new backup system is going to be automatic.
I must also find a good way to enforce the monthly switch with the offsite disk, which I may easily forget. The best I can do so far is to automate a monthly notification.
Disk formatThe data saved on my backup disks must be as readable as possible. If my hackintosh crashes, I do not want to need another Mac to recover the data. The exFAT format is the first one I could find that supports writing and reading both in Windows and Mac OS X. Unfortunately, Snow Leopard does not let you format a disk in exFAT (surely because of legal issues, since Microsoft owns exFAT), so I had to do that from my Windows 7 machine.
Smart copyingRather than just copying all data from an internal disk to the external, it would be better to only copy new files. Luckily, that is exactly what
From rsync's man page:
Rsync is a fast and extraordinarily versatile file copying tool. [...] It offers a large number of options that control every aspect of its behavior and permit very flexible specification of the set of files to be copied. It is famous for its delta-transfer algorithm, which reduces the amount of data sent over the network by sending only the differences between the source files and the existing files in the destination.
rsyncis available on Mac OS X, and probably on all modern linux distributions.
So far, this command is what I use:
-ais for archive, which preserves dates, permissions, owners, groups, symlinks, and the like. It also browse the source folder recursively.
-vis for verbose. I like to see what is happening, this will probably be removed when I feel confident that the script is doing what I want.
--excludeexcludes file patterns from the backup. I have some applications that stubbornly put themselves in my home directory. I have also excluded
.Trash, and will probably exclude
Library/. A list of patterns to exclude may be provided in an external text file.
~/is the source folder being backed up, and
/Volumes/Bluebird/is where the backup files are being copied to. Note the trailing slashes in the paths!
Future improvementsI do the copying with
rsyncand the swapping manually for now. Planned improvements are:
- automate the local copying with
- save the result in a log file
- send a notification if something went wrong
To avoid swapping manually, I could put my offsite copy on an external server. This kind of services is already available from big companies, but I am not sure how much it would cost for several hundreds of gigabytes of raw format pictures and videos. It certainly wouldn't give me the satisfaction of having done the setup myself.
Another alternative is to use a friend's server to connect my offsite copy disk to. This would require a reliable friend (or encryption, or both), who has a server on most of the time, and a decent line. It seems like a viable option, which I may look into in the future.
I'll keep writing when I find time to implement these improvements.