Simultaneous full and incremental backups with rsync

by Olivier Sessink

On a filesystem that supports hardlinks you can create multiple full backups that share their disk usage for files that have not been changed.

Assuming the backup disk is mounted on /backup

# remove the oldest backup rm -rf /backup/root.1 # move the one-but-oldest backup to the place of the oldest mv /backup/root.0 /backup/root.1 # copy the current backup using hardlinks cp -al /backup/root /backup/root.0 # use rsync to update the new directory rsync -ax --delete / /backup/root echo "This backup was made on `date`"> /backup/root/stamp