Time Machine

Joe Gregorio

Time Machine for every Unix out there is a great tutorial on how to get Time Machine like backups using rsync and cron. I don't need it as an external backup, but just for the ability to go back in time, you know, when I forget to add a file to a repository and blow away the directory believing everying is safe in subversion, or when I edit and overwrite an original photo, or, or ... do we really need to go into all the ways I need Time Machine like capabilities? Anyway, also read the comments for pointers to lots of alternatives.

Have you seen backup2l? "backup2l supports hierarchical differential backups with a user-specified number of levels and backups per level. With this scheme, the total number of archives that have to be stored only increases logarithmically with the number of differential backups since the last full backup. Hence, small incremental backups can be generated at short intervals while time- and space-consuming full backups are only sparsely needed." http://backup2l.sourceforge.net/

Posted by Noah Slater on 2009-01-21

The key innovation of Time Machine was to modify Darwin to allow hard-linking of direcories.

Each Time Machine backup is a complete directory tree of your filesystems. Unmodified files/directories are hard-links. Only the modified ones take up new space on disk.

On a garden-variety Unix system (without hard-linking of directories), keeping multiple such backups would take up a prohibitive amount of space.

The other key innovation was a system for real-time tracking of changes to the filesystem (again, requiring hooks into the kernel). Having Rsync scan the entire filesystem for changes at every backup (once an hour, in Time Machine's case), would be tedious in the extreme.

Posted by Jacques on 2009-01-21

Jacques,

Probably depends on what you're trying to monitor, I'm not backing up the entire filesystem, just my home directory minus the obvious things like the browser cache. The given rsync directions use hard-links for files, each hourly back up takes up about 1MB for me and completes in less than a second.

Posted by Joe on 2009-01-21

I've been using a tool called Rsnapshot (http://www.rsnapshot.org/) for a couple years now. It automates the rsync process and uses filesystem hard links to avoid having additional copies of files for each snapshot. Works great and is reliable.

Posted by Aaron on 2009-01-22

comments powered by Disqus