server feature request. forced backup
wayned at samba.org
Thu Jan 12 19:33:55 GMT 2006
On Thu, Jan 12, 2006 at 01:26:32PM +0100, Paco Rosich wrote:
> Seems to me that this could be done with a new server option
> (--forced-options???) to force the --backup thing to be done, so the
> rsync server never completely destroys any data it has stored.
This is possible using the latest CVS source using the "pre-exfer exec"
server option with a custom script/command. You would make the script
examine the RSYNC_ARG# values (e.g. RSYNC_ARG1) and verify that the 'b'
option was included in the short-option letters, that the --backup-dir
option was present, and that the arg right after --backup-dir was the
expected directory string. If they were not, it would simply need to
exit with an error status and rsync would abort the transfer.
As an example, these RSYNC_ARG# variables might be present:
Note that $RSYNC_ARG3 contains the 'b' (--backup) option.
More information about the rsync