rsync --delete-hide

Saku Vainikainen saku.vainikainen at welho.com
Sun Apr 6 03:30:53 MDT 2014


Hello!

I was wondering wether or not this would be a viable option to add to rsync:

--delete-hide

Instead of deleting the file, rsync would rename the file using leading “.” and trailing “.deleted-{timestamp}”.

rsync -rv --delete-hide /src/ /dst/

For example if /src/readme.txt had already been rsynced to /dst/readme.txt and then later was deleted from /src, rsync would - instead of deleting /dst/readme.txt - rename /dst/readme.txt to /dst/.readme.txt.deleted-20140604120445.

Rgrds,
Saku Vainikainen.



More information about the rsync mailing list