how to move the files that should be deleted to somewhere else

Matt McCutchen hashproduct+rsync at
Mon Oct 16 03:11:00 GMT 2006

On 10/15/06, Jerry Fleming <jerry.fleming at> wrote:
> I am using rsync version 2.6.4 on Debian 3.1rc. I use rsync in this way:
> rsync -avLz -e ssh --progress --delete --exclude=file
> root at /mnt/usb/
> Now I would like all old files that should be deleted to be kept in
> somewhere else, maybe also renamed to append a timestamp. Any suggestion
> will be appreciated.

You can use --backup, but it will keep copies of overwritten files as
well as deleted files.  You can put the backups in another directory
(--backup-dir) and/or append a string of your choice to their names


More information about the rsync mailing list