<div dir="ltr">Hi,<br>I think a very similar functionality can be achieved by using the existing --backup option? Using the backup (-b) option in conjunction with the --del option allows you to set a suffix (using --suffix) . But of course you can't add a prefix (to hide it) currently I think<br>



So I might use something like:<br><br><div>rsync -rv -b --del --suffix=".deleted-$(date +%Y%m%d%H%M%S)" -f "P *.deleted-[[:digit:]]*" src/ dst/<div><br>The -f filter rule would be required to protect existing deleted files from getting deleted again.
<div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 6, 2014 at 3:00 PM, Saku Vainikainen <span dir="ltr"><<a href="mailto:saku.vainikainen@welho.com" target="_blank">saku.vainikainen@welho.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hello!<br>
<br>
I was wondering wether or not this would be a viable option to add to rsync:<br>
<br>
--delete-hide<br>
<br>
Instead of deleting the file, rsync would rename the file using leading “.” and trailing “.deleted-{timestamp}”.<br>
<br>
rsync -rv --delete-hide /src/ /dst/<br>
<br>
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.<br>




<br>
Rgrds,<br>
Saku Vainikainen.<br>
<span><font color="#888888"><br>
--<br>
Please use reply-all for most replies to avoid omitting the mailing list.<br>
To unsubscribe or change options: <a href="https://lists.samba.org/mailman/listinfo/rsync" target="_blank">https://lists.samba.org/mailman/listinfo/rsync</a><br>
Before posting, read: <a href="http://www.catb.org/~esr/faqs/smart-questions.html" target="_blank">http://www.catb.org/~esr/faqs/smart-questions.html</a><br>
</font></span></blockquote></div><br></div></div></div></div>