<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Thank you for the thorough answer, very helpful. I’ll start poking around!<div class=""><br class=""></div><div class="">best regards,</div><div class="">Francois</div><div class=""><br class=""></div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Mar 24, 2019, at 6:27 PM, Dave Gordon <<a href="mailto:dg32768@zoho.eu" class="">dg32768@zoho.eu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta content="text/html;charset=UTF-8" http-equiv="Content-Type" class=""><div class=""><div style="font-size: 10pt; font-family: Verdana, Arial, Helvetica, sans-serif;" class=""><div class=""><div class="">I think you would implement it as a new type of filter rule. similar to 'P' (preserve) but with a timestamp or delta-time to define what counts as 'recent' as well as the pattern to match for this rule to apply (which could just be a wildcard matching anything by default, but could also use the full pattern-matching capabilities if required).<br class=""></div><div class=""><br class=""></div><div class="">Have a look at:<br class=""></div><ol class=""><li class="">the 'make_backups' logic in parse_arguments(), where it adds a 'Preserve' pattern to match all backup files,<br class=""></li><li class="">name_is_excluded() and its subfunctions check_filter() and rule_matches() in exclude.c<br class=""></li></ol><div class="">You'd need to:<br class=""></div><ul class=""><li class="">define a new filter-type character ('R' for preserve-Recent?)<br class=""></li><li class="">define the format of the filter rule for this type e.g. how to represent the time<br class=""></li><li class="">add code to parse this new ruletype in rule_matches()<br class=""></li><li class="">decide how your new option interacts with existing filter rules (higher or lower precedence, degree of specificity, etc)<br class=""></li><li class="">add code to insert one or more rules of the new type into the filter list in appropriate positions<br class=""></li></ul><div class="">Also:<br class=""></div><ul class=""><li class="">bump the protocol revision number, because an old rsync wouldn't understand the new ruletype<br class=""></li><li class="">decide what to do in the case where one side is using the older protocol (e.g. treat it as traditional --delete, or don't delete at all?).<br class=""></li></ul><div class="">So not trivial, but not impossibly difficult, and at least the changes would be fairly localised. <br class=""></div><div class=""><br class=""></div><div class="">Hope this helps,<br class=""></div><div class="">.Dave.<br class=""></div><div id="Zm-_Id_-Sgn" class=""><p style="" class=""><span class="colour" style="color:rgb(42, 42, 42)">Sent using <a target="_blank" href="https://www.zoho.com/mail/" style="color:#598fde;" class="">Zoho Mail</a></span><br class=""></p></div><div class=""><br class=""></div><div style="" class="zmail_extra"><div id="Zm-_Id_-Sgn1" class="">---- On Fri, 22 Mar 2019 06:02:33 +0000 <b class="">Francois Payette via rsync <<a href="mailto:rsync@lists.samba.org" class="">rsync@lists.samba.org</a>></b> wrote ----<br class=""></div><div class=""><br class=""></div><blockquote style="border-left: 1px solid rgb(204, 204, 204); padding-left: 6px; margin: 0px 0px 0px 5px;" class=""><div class=""><div class="">Kudos all that maintain this awesome and enduring piece of software. Awesome job, many thanks. <br class=""></div><div class=""><br class=""></div><div class="">I’ve come across a use case that would greatly benefit form a —delete-older-than <secs> argument. This would behave the same as —delete only sparing files dest that have a creating time less than <secs> ago. How hard would this be to implement? Where would I start ? <br class=""></div><div class=""><br class=""></div><div class="">TIA, <br class=""></div><div class="">Francois <br class=""></div><div class="">-- <br class=""></div><div class="">Please use reply-all for most replies to avoid omitting the mailing list. <br class=""></div><div class="">To unsubscribe or change options: <a target="_blank" href="https://lists.samba.org/mailman/listinfo/rsync" class="">https://lists.samba.org/mailman/listinfo/rsync</a> <br class=""></div><div class="">Before posting, read: <a target="_blank" href="http://www.catb.org/~esr/faqs/smart-questions.html" class="">http://www.catb.org/~esr/faqs/smart-questions.html</a> <br class=""></div></div></blockquote></div><div class=""><br class=""></div></div><div class=""><br class=""></div></div><br class=""></div></div></blockquote></div><br class=""></div></body></html>