Ensuring that your important data is safe and secure is important in the modern age, yet most people that I know (even the tech savvy ones) don’t create backups.
I have a few backup solutions at home to ensure that key documents I don’t want to lose are safe; version control, on-site and secure off-site backups.
This is a must have tool for developers and with my strong Software Engineering background it’s hardly surprising that I’ve kept a version control solution at home for many years. I’ve got a Subversion server and a Mercurial server. The former is what I’ve grown up with and used for years. I feel at home with it, like those jeans your Mrs. keeps trying to throw away but you hang onto for several years past their life expediency.
The problem with Subversion is you must have an available connection to the server to use it… not always ideal. I still keep it around for nostalgia, peeking back at the revisions of my old software every now and they to see how much I’ve grown. Also, all my old University work is in here which, surprisingly enough, I still go back to reference every now and again, normally when a new Placement student starts at work.
Mercurial on the other hand is distributed. I can clone my master repository and hit-the-road, gaining all the befits of version control without a network connection and, when I’m back, push those changes back to the master repository as a backup.
Don’t get me wrong, version control isn’t just for developers. I have my girlfriend a repo when she was doing her teaching degree in order to keep track of evolving documents and have an off-site backup in-case of an emergency – it worked well. This leads me nicely onto the subject of this post; backups.
Rsync as a backup solution
I wanted my Home theatre PC to be the HUB for my backup solution; it’s low power, quiet and always on, plus it has over 5TB of storage on it today.
The HTPC machine runs an rsync daemon, I have seperate primary backup locations defined for various rsync tasks: –
- Off-site backup for my parents documents and digital photos – This is accessed by a schedule task using secure rsync SSH tunnel (pass the -e “ssh -i /path/to/my/private.key” flag to rsync to go via ssh)
- Location for my Desktop machine – rsync across LAN weekly
- Location for my Version control repositories – rsync locally nightly
I also have primary backup locations for non-rsync tasks
- Location for my PS3 data (although I really wish PS3 supported backups via Samba and not USB dongles)
- robweeks.net – my domain does a full backup via SSH straight here when I request it (I’ve not got the web host admins to cron me it up yet)
- Gmail archive – I got paranoid after the recent data loss experience by google users and implemented a getmail cron to download all my mail daily, just in case.
On a nightly basis I sync my primary backup to an external on-site hard-drive, in-case my disk blows up. On a weekly basis I backward sync my primary backup to an off-site location (in-case we get robbed!)
In short; rsync is brilliant. It does exactly what it says on the tin, is secure, supports compressed traffic transfer (if bandwidth is an issue) and was all set up in about an hour! If you’re interested there are hundreds of tutorials around to aid you in setting it up. If you’re looking at implementing it on Windows, check out cwrsync.