Skip to content

Commit

Permalink
Merge pull request #7709 from TimWolla/backport-doc-keep-within
Browse files Browse the repository at this point in the history
Backport: Improve the documentation for `--keep-within`
  • Loading branch information
ThomasWaldmann authored Jul 4, 2023
2 parents dfa04ee + b58c6ce commit e5cc2e1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions docs/usage/prune.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,6 @@ If you have multiple sequences of archives with different data sets (e.g.
from different machines) in one shared repository, use one prune call per
data set that matches only the respective archives using the -P option.

The ``--keep-within`` option takes an argument of the form "<int><char>",
where char is "H", "d", "w", "m", "y". For example, ``--keep-within 2d`` means
to keep all archives that were created within the past 48 hours.
"1m" is taken to mean "31d". The archives kept with this option do not
count towards the totals specified by any other options.

A good procedure is to thin out more and more the older your backups get.
As an example, ``--keep-daily 7`` means to keep the latest backup on each day,
up to 7 most recent days with backups (days without backups do not count).
Expand All @@ -145,11 +139,18 @@ hourly, daily, weekly, monthly, or yearly rules was not otherwise able to meet
its retention target. This enables the first chronological archive to continue
aging until it is replaced by a newer archive that meets the retention criteria.

The ``--keep-within`` option takes an argument of the form "<int><char>",
where char is "H", "d", "w", "m", "y". For example, ``--keep-within 2d`` means
to keep all archives that were created within the past 48 hours.
"1m" is taken to mean "31d". This option is applied before the secondly option
and like the other options any archives kept by this option do not count towards
the later rules.

The ``--keep-last N`` option is doing the same as ``--keep-secondly N`` (and it will
keep the last N archives under the assumption that you do not create more than one
backup archive in the same second).

When using ``--stats``, you will get some statistics about how much data was
deleted - the "Deleted data" deduplicated size there is most interesting as
that is how much your repository will shrink.
Please note that the "All archives" stats refer to the state after pruning.
Please note that the "All archives" stats refer to the state after pruning.

0 comments on commit e5cc2e1

Please sign in to comment.