Understanding backup-dir semantics

James Delahanty jimd at gie.com
Mon Dec 17 09:57:24 EST 2001


The backup-dir is directly related to the destination, so is only a
directory, not a server::module/directory thing.

To be more specific: backup-dir=<SOMETHING> is a command to the
destination RSYNC program to place files that have changed AT THE
CURRENT DESTINATION into the location specified by SOMETHING, instead of
deleting or renaming them.  The backup directory is *completely
relative* to the destination MODULE.  In your example, you are
connecting to the "pooh" MODULE on roo, and so, your backup-directory is
relative to the definition of "pooh" (from rsyncd.conf, [pooh] may equal
/var/machines/pooh, for example.).  If you want to place documents in
"pooh"/archive/user/, then your backup-dir=/archive/user/  (Which, from
the above example, will place the files in

Note: You can NOT specify another destination AREA for the backups, but
you can use symlinks to your advantage on the linux side.
Note2: Always end the backup-dir with a slash.

Your true life example should read:

rsync -a --delete --backup --backup-dir=/archive/user/ '/My\
Documents/*' roo::pooh/backup/

and, assuming that rsyncd.conf defines [pooh] as /var/machines/pooh/,
the file destination will be /var/machines/pooh/backup/, and the
directories for backed-up files will start at

Jim Delahanty
jimd at gie.com

More information about the rsync mailing list