rsync --delete-hide

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


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


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.

Saku Vainikainen.

More information about the rsync mailing list