trying to get incremental backups working

jw schultz jw at
Wed Apr 23 13:30:41 EST 2003

On Tue, Apr 22, 2003 at 11:14:59PM -0400, John Mearns wrote:
> So I'm trying to write up a short script to do some backups over rsync.
> The goal is to have multiple client machines push the backups to the
> backup server nightly. The backup server will have a complete copy of the
> selected directories as well as revisions for the last 7 days.
> Here is the brief script I have. Btw if you're wondering about all the
> variables, I eventually want to set it to pull the values for them from a
> conf file that others will edit through a web interface.
> BACKUPDIR=`date +%A`
> ARCHBASE=/home/catbertbackup/backuparchive/
> CURRENT=current
> INCLUDEFILE=/usr/local/etc/backup2/include
> rsync --delete --backup --backup-dir=$ARCHBASE$BACKUPDIR -ae ssh
> rsync --delete --backup --backup-dir=$ARCHBASE$BACKUPDIR -ae ssh
> Right now this does pretty much what I would like. I need to do multiple
> directories though. What is the best way for me to make this do say
> /usr/local/etc /etc and /home? I've tried a few different things and
> nothing has come out too well yet. Ideally I'd like all of the backed up
> directories under /home/catbertbackup/backuparchive/current/etc and
> /home/catbertbackup/backuparchive/Tuesday/etc but also have
> /home/catbertbackup/backuparchive/current/usr/local/etc
> Because I have to use the --delete flag though I'm having trouble doing
> that. For instance with the script it will sync /usr/local/etc, then
> sync /etc and delete /usr/local/etc.  Any suggestions on how to do
> this and wind up with all the backups in one directory would be quite
> appreciated!

instead of using --delete and --backup remove the
destination and recreate it with --link-dest pointing to the
previous one.

Alternatively you could use something that already exists
and costs nothing such as rlbackup or dirvish.

	J.W. Schultz            Pegasystems Technologies
	email address:		jw at

		Remember Cernan and Schmitt

More information about the rsync mailing list