Custom backup retention tool

The two answers above go well together, and before writing a tool, somebody should update the manual.
Creating a new backup job explains the old simpler choices, and needs a section on new complex ones:

Fortunately when you get to Options screen, there’s a little bit of help-by-example, but U was added later.

image

Help text has caught up with U, but retention-policy has not. The builtin help text is better though, saying:

  --retention-policy (String): Reduce number of versions by deleting old
    intermediate backups
    Use this option to reduce the number of versions that are kept with
    increasing version age by deleting most of the old backups. The expected
    format is a comma separated list of colon separated time frame and
    interval pairs. For example the value "7D:0s,3M:1D,10Y:2M" means "For 7
    day keep all backups, for 3 months keep one backup every day, for 10
    years one backup every 2nd month and delete every backup older than
    this.". This option also supports using the specifier "U" to indicate an
    unlimited time interval.

but U can actually also be used on the time frame side (and is quite valuable there, because backups are removed when they are no longer in any time frame). For those who really want to see the code, it’s here, revealing that whoever posted the 0s interval might have been trying to get unlimited that way. Use U now.