Home Research Papers Vitae Resources Contact

Backing Up

Like most people, one of my hobbies is making sure my computer is fully backed up. This likely stems from the common childhood memory of realising some important piece of homework had just been accidentally deleted. Or was on the thumb drive now on its way to the vet inside the dog. To combat the reoccurrence of these nightmares I have become quite interested in backup solutions.

The overarching principle I would suggest is to use many and varied solutions to tackle different needs. For example, if your disk fails just before your grant needs to be submitted you need something to get you up and running quickly. On the other hand, if you accidentally overwrite a directory of carefully edited proofs, you need some increments to save you. However, if your office is broken into and some merry not-so-Robin-Hood-type makes off with your computer, and your backup disk which happened to be on the same desk, you might have needed some offsite storage.

Time Machine

As a Mac user, Apple's Time Machine is a good starting point. It does many of the things you need from a backup. It is automatic. It handles increments. It allows for easy restoration to a previous state. All very good. However, it has some draw backs. Most clearly, if your disk fails you have to put a new disk in and copy all the files across before you can get back to work. So a day or two to get the disk and stick it in and then an infuriating 3-12 hours of watching the pale blue bar grow!

While I think Time Machine is very nicely put together, and a good starting point, I think it is best augmented with some other solutions.

Carbon Copy Cloner

A third party backup solution which has some merits is Carbon Copy Cloner. CCC does what it sounds like. It clones your disk exactly. Somewhat more sophisticated than just copying all your files across, CCC makes a complete copy of your drive that you can boot from. On a Mac, if you hold alt/option during startup you can select the boot disk. If you connect a CCC disk you can choose to boot form that. This gives you the option of being abel to instantly carry on working if your drive fails. Reboot form CCC. Submit proposal. Have a drink and then sort out the corrupted drive. The alternative finishes much later in the evening and has potentially more serious career implications.

Carbon Copy Cloner can also handle incremental backups, though not quite as nicely as Time Machine, so is certainly a set in the right direction. However, it still requires a physical disk so doesn't solve the problem of your drive and computer going on vacation together.

rsync

One solution to the offsite problem is to switch backup drives. This is a good step but it requires superhuman levels of discipline to keep a decent set of incremental backups in physically separated drives.

The solution needs to be somewhat more homegrown. What I think is not an exaggeration to call the Holy Grail of backing up is needed. An automatic, incremental, offsite backup. Synced over the internet. From anywhere in the world. To somewhere else in the world. While this could likely be achieved with third party software, it is much more fun to write it ourselves. Right!

The solution to this grail is rsync. rsync is a unix utility for recursive copying. rsync, however, only copies what has changed (it is in fact what is under the skin of Time Machine and CCC). This means it can ensure huge amounts of backup data are up-to-date very quickly.

So, by using rsync to backup, crontab to schedule, and a bit of good old shell scripting to tidy up we can fairly easily make some incremental backups that are much more flexible than either Time Machine or CCC. Then if, for example, we set the destination directory to be a network drive we happened to have access to in another country, or even Google Drive or Drop Box, the Holy Grail is very much within our grasp.


Disclaimer: I do not profess to know anything about how your data should be backed up. The solutions described above work for me and I hope might be interesting to you. The point is - make sure you think of a solution that will work for your situation and don't rely on someone else to make sure you don't lose your files at the worst possible moment.