<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1500959654864_8696">rsync --delete option tells rsync to delete extraneous files from the receiving side (ones that aren't on the sending side).</div><div id="yui_3_16_0_ym19_1_1500959654864_8697">But if a user accidentally deletes a file, there is no way to restore it from the server.</div><div id="yui_3_16_0_ym19_1_1500959654864_8698">If --delete option is not used, and the local hard disk is destroyed, restored data will include old deleted files.</div><div id="yui_3_16_0_ym19_1_1500959654864_8699"><br id="yui_3_16_0_ym19_1_1500959654864_8700"></div><div id="yui_3_16_0_ym19_1_1500959654864_8701">Is there a way for rsync server to retain backup of deleted source files, and mark them as extraneous?</div><div id="yui_3_16_0_ym19_1_1500959654864_8702">That way a directory can be restored from backup, excluding the old deleted files.</div><div id="yui_3_16_0_ym19_1_1500959654864_8703"><br id="yui_3_16_0_ym19_1_1500959654864_8704"></div><div id="yui_3_16_0_ym19_1_1500959654864_8705">It could work something like this:</div><div id="yui_3_16_0_ym19_1_1500959654864_8706"><br id="yui_3_16_0_ym19_1_1500959654864_8707"></div><div id="yui_3_16_0_ym19_1_1500959654864_8708">    when rsync server notices an unmarked extraneous file, it timestamps and marks the file as extraneous.</div><div id="yui_3_16_0_ym19_1_1500959654864_8709" dir="ltr">    rsync server periodically deletes extraneous files like this</div><div id="yui_3_16_0_ym19_1_1500959654864_8710">        if (extraneous_mark == true and timestamp > current_date - age), then delete the file</div><div id="yui_3_16_0_ym19_1_1500959654864_8711">    where age is number of days extraneous files are retained.</div><div id="yui_3_16_0_ym19_1_1500959654864_8712">    </div><div id="yui_3_16_0_ym19_1_1500959654864_8712">    rsync client can restore deleted files from server.</div><div id="yui_3_16_0_ym19_1_1500959654864_7674"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1500959654864_8713">    rsync client can restore directory from server, excluding extraneous files.</div><div></div><div id="yui_3_16_0_ym19_1_1500959654864_7677"> </div><div id="yui_3_16_0_ym19_1_1500959654864_7677"><br></div><div class="signature" id="yui_3_16_0_ym19_1_1500959654864_7681">Thank you,</div><div class="signature" id="yui_3_16_0_ym19_1_1500959654864_7681">Wolfram Volpi</div></div></body></html>