rsync as a bakcup tool and the case of rotated logs

Craig Barratt craig at
Thu Nov 28 17:52:00 EST 2002

> 1) have rsync "understand" that file names might have changed, maybe by
> comparing files through their md5 signature instead of by their name,
> that way rsync would see that /backup/syslog.198.gz is the same as
> /var/log/syslog.197.gz and not retransfer it,

The best choice is to rename the syslog files with a date, and don't
repeatedly rename them, eg: syslog.YYYYMMDD.gz (eg: syslog.20021128.gz).
Pruning old ones isn't too hard: simply reverse sort the names and
remove everything after the first 213.  It also makes it easier to
find a particular log file.

> 2) create hard-links to identical files in
> --backup-dir=/backup/incremental-2002-11-27 when is detects that
> /server/sylog.138.gz is the actually the same as
> /backup/current/syslog.137.gz,

BackupPC is one package that does this; see 
(disclaimer: I'm the author).  I'm in the process of adding rsync support.


More information about the rsync mailing list