The only suggestion I have is to adjust the command line interface to change the behavior of the return code.
Something like: rdiff-backup --remove-older-than 30d --ignore-warning ? Or the other way around: rdiff-backup --remove-older-than 30d --error-if-nothing-is-removed ? Other command line tools are also tweaking the exit code behaviour based on the command line flag. e.g. curl has "--fail" flag As a reference, here is the initial request to change the exit code behaviour: https://github.com/rdiff-backup/rdiff-backup/issues/616 That might explain a bit the difference in usecases. On Fri, Feb 17, 2023 at 9:01 AM Derek Atkins <[email protected]> wrote: > Eric, > > On Fri, February 17, 2023 6:52 am, Eric Zolf wrote: > > Hi, > > > > On 17/02/2023 09:00, Reio Remma wrote: > >> Getting complicated. I agree, that "No increment is older than 20D" > >> shouldn't be a warning, it's quite normal behaviour. > > > > Here we can agree to disagree, because it depends on the context, but > > I'd ask why did you start this command if you knew that nothing would > > happen and you are not surprised by the result? > > I have a script that backs up a bunch of servers and then after the backup > re-runs rdiff-backup to remove increments older than 1y. Sometimes there > are none (for example, if there was a power outage a year before causing > the backups to fail then). To my mind, this case is NOT AN ERROR. > > Did I know nothing would happen? No. > Am I surprised by the result? No. > Do I expect an error code? No. > Do I want to have to rewrite my script? Definitely Not! > > This gets even more complicated because my script is set up to run > multiple versions of rdiff-backup based on the version on the target > machine! Right now I have 1.2.8 and 2.0 both running simultaneously on > the backup server. Right now I can configure the rdiff-backup version in > the per-target config, but the script that runs the command is common. If > I have to change the script to handle errors differently, that would > very-much complicate my backup system. > > > KR, Eric > > -derek > > -- > Derek Atkins 617-623-3745 > [email protected] www.ihtfp.com > Computer and Internet Security Consultant > > > -- IKUS Software https://www.ikus-soft.com/ 514-971-6442 St-Colomban, QC J5K 1T9
