Anyone used rsync scriptology for incremental backup?

Miroslav Lachman 000.fbsd at quip.cz
Wed Oct 29 17:11:04 PDT 2008


Clint Olsen wrote:
> I've seen some stuff online that made it look like using hard-link trees
> and then doing some rsync worked, but some of this appears to be obsoleted
> by new rsync features.  If anyone has a pointer, that would be much
> appreciated.

I think freebsd-stable@ is not the right place to ask...

This is part of my script I am using for "snapshotted" backups:

src_host="10.20.30.40"	# ip, ip:port, host, host.example.com:873
src_user="rsync_user"
src_module="module_name"
pass_file="/path/to/.rsync.passwd"  # file with password for rsync_user
dest="/where/to/store/backups"
rsync_log="/var/log/rsync_backup.log"
today=`date "+%Y-%m-%d"`
yesterday=`date -v -1d "+%Y-%m-%d"`
dest_curr="${dest}/${today}"	# current backup dir by date [today]
dest_last="${dest}/${yesterday}" # last backup dir from previous day

rsync -a -H --log-file=${rsync_log} --numeric-ids 
--password-file=${pass_file} --link-dest=${dest_last} 
rsync://${src_user}@${src_host}/${src_module} ${dest_curr}


This script is runned daily from backup server (where backups are stored).
Rsync daemon is configured and running on backed up machine.

Miroslav Lachman


More information about the freebsd-stable mailing list