The apple’s time-machine concept is precisely what i want for my laptop “backups”

For the information sitting in my laptop i don’t want traditional disaster and recovery backups, i want to be able to, quickly, search and restore any version of ( virtually ) any file.

Tthe problem? i don’t own a mac.

The principle of the thing:

Incremental backup of all the files that changed in a short period of time ( let’s say 5 minutes, apple’s time machine does it every hour ).
Create a snapshot of your laptop at the backup time, this implies being able to browse the laptop the exact same way that you browse your current file structure

My current setup:


BACKUPDIR="/backups"
DIRSTOBACKUP="/home /data"
date=`date "+%Y-%m-%dT%H:%M:%S"`
rsync -aP --exclude-from=~/backup.exceptions \
     --link-dest=$BACKUPDIR/current $BACKUPDIR/back-$date $DIRSTOBACKUP

cd $BACKUPDIR; rm -f current ;ln -s back-$date current

This rsync command line will backup all the files in DIRSTOBACKUP to $BACKUPDIR/back-$date .

The -a will ensure all the files are copied and their attributes preserved.

-P justs add the ability to resume interrupted backups.

--link-dest is really the core option. With this option, rsync will hard-link all the unchanged files to --link-dest. So, in you backup dir you'll end-up with all the changed files and bunch of hard-links to the unchanged files saving you a lot of storage space.

After that just updates the current symlink to the newest backup.

Now, in $BACKUP_DIR you have accurate snapshots of your laptop in all the backup times.