MyNixOS website logo
option

services.borgbackup.jobs.<name>.prune.keep

Prune a repository by deleting all archives not matching any of the specified retention options. See borg help prune for the available options.

Declarations
Type
attribute set of (signed integer or string matching the pattern [[:digit:]]+[Hdwmy])
Default
{ }
Example
{
  within = "1d"; # Keep all archives from the last day
  daily = 7;
  weekly = 4;
  monthly = -1;  # Keep at least one archive for each month
}