Differential backup

Matt McCutchen matt at mattmccutchen.net
Sat Nov 8 20:44:39 GMT 2008


On Sat, 2008-11-08 at 20:11 +0100, misiek wrote:
> I have got three folders:
> - /home/backup/2008-10-20 - place for differential backup
> - /mnt/for_backup - folder with files for backup
> - /home/backup/2008-10-01 - place where the last full backup is
> 
> My question: is below command prepared correctly to make differential 
> backup?
> 
> rsync -avPbn --backup-dir=/home/backup/2008-10-20/ --exclude "System 
> Volume Information" --exclude "RECYCLER" /mnt/do_backup 
> /home/backup/2008-10-01

No.  --backup-dir does not do what you think it does.  To make a forward
differential backup, you want to use --compare-dest:

rsync -avPbn --compare-dest=/home/backup/2008-10-01/ \
	--exclude "System Volume Information" --exclude "RECYCLER" \
	/mnt/do_backup /home/backup/2008-10-20

Consider whether you want a trailing slash on the source; see the second
and third examples in the "USAGE" section of the man page.

Matt



More information about the rsync mailing list