Using --remove-source-files with backup?

ScottZ mylists at pinesalad.net
Sat May 5 00:13:11 GMT 2007


I have a scenario where I am copying from a local system to remote target and need to remove the local source files once they have been successfully transfered.

--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.

With rsync 2.6.9 I tried:
rsync --remove-source-files --backup-dir=/archive –abv (source) (remotehost:target)

The result was that the backup files were made in /archive on the remotehost system and not the local system (where the original files were removed).

Is this a bug or is the backup option only able to backup deleted target files?
Is there another way around this?

Note: As a WAG, I tried using a myhost:/archive (where myhost is my source host) type of entry for --backup-dir, but that just created a myhost: directory on the remotehost:target directory. Like I said, it was a WAG.

Thanks,
-Scott












More information about the rsync mailing list