Using --remove-source-files with backup?

Matt McCutchen hashproduct+rsync at gmail.com
Sun May 6 13:35:14 GMT 2007


On 5/4/07, ScottZ <mylists at pinesalad.net> wrote:
> --remove-source-files works fine for this.
>
> An issue has come up in that I need to be able to backup the removed local source files as well.

I think the simplest way to accomplish this is to make a modified
version of rsync that supports backing up removed source files.  In
fact, I did.  The attached patch to rsync 2.6.9 adds a --source-backup
option that backs up removed source files.  You can compile and use
your own copy of rsync that includes this patch.

In case you're not familiar with compiling patched software, here are the steps:
1. Save the attached rsync-2.6.9-source-backup.diff somewhere.
2. Download and extract the rsync source package
http://rsync.samba.org/ftp/rsync/rsync-2.6.9.tar.gz somewhere.
3. At the command line, cd into the extracted directory "rsync-2.6.9".
4. To apply the patch, run (substituting the actual place you saved the patch):
  patch -p1 <path/to/rsync-2.6.9-source-backup.diff
5. To compile rsync, run:
  ./configure
  make
That makes an rsync executable in the current directory.  You can run
it from there or copy it to a directory on your $PATH.

Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rsync-2.6.9-source-backup.diff
Type: text/x-patch
Size: 4384 bytes
Desc: not available
Url : http://lists.samba.org/archive/rsync/attachments/20070506/ae8324e7/rsync-2.6.9-source-backup.bin


More information about the rsync mailing list