Wednesday, January 16, 2008

Time Machine for linux


(Screenshot of Mac OSX Leopard - Time Machine from http://www.peachpitcommons.com/?p=223)

OSX supports Time Machine, a clean & easy to use backup solution that allows you to treat a harddisk like a CVS repository, limited only by destination HDD size. It has flashy graphics to give you a good representation of what a supported application or directory looked like on a previous day. And, the big plus is that you can restore the OS back to a harddisk, how it appeared on a certain day (so you could have 5 computers set up with a config showing the computer on every sunday for the past 5 weeks). At my previous place of work, I used this to create a copy of the server so there was a testbed for our new technicians to play with.



(Screenshot from http://en.wikipedia.org/wiki/Shadow_copy)

Windows supports Shadow Copy. Similar to Time Machine but without the flashy graphics, and unlike the claims many Apple users are happy to make, also integrates cleanly into applications. Unlike Time Machine though, it does not seem to be able to install a fresh copy of the OS from a certain day, only revert it back to a certain day.

What does linux support? Rsync maybe? Great fun, if anyone can ever remember the damned cron and rsync commands. Seriously though, Linux needs something similar to Time Machine or Shadow copy. If I want to crop my ex-wife out of a picture, when we hook up again, I should be able to just as easily revert the image back to the way it was. Or if I did it to an entire photo album, I should be able to select the whole album via gui, and within a few clicks, be able to revert all the pics in that album back to a certain date.

If it is properly implemented and integrated, it could even prevent programmers needing to run private home cvs systems to track their code too for smaller projects.

In fact if people wished to go overboard, you could even allow forking of restorations, so that you can have a few different sets. Like you set up two different types of servers on 10/10/10, one used Mysql, the other one has oracle. You can change between them by going to the other side of the fork (at the expense of not having a consistant DB, but anyway, its an example).

Apple's implementation is quite elegant and efficient. It uses dated directories as the base of each backup, backs up each file only once onto the drive, and then future revisions use hardlinks to the already backed up file. This way each directory appears to contain every file from a certain day, but much less space is used. The disadvantage? Depending on the way checks are implemented, if one rarely modified backed up file gets infected by a virus, all revisions are infected. However, it makes restoring a day as simple as copying a directory back and restoring the hardlinks.

Flashy graphics are not a requirement. We can take Microsofts serious "just get this done" approach, which wont woo users, but better then having something overly complex which may end up jamming up a few systems.

No comments: