|
@@ -12,59 +12,53 @@ borg prune
|
|
|
|
|
|
.. class:: borg-options-table
|
|
|
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | **optional arguments** |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | | ``-n``, ``--dry-run`` | do not change repository |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--force`` | force pruning of corrupted archives, use ``--force --force`` in case ``--force`` does not work. |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | | ``-s``, ``--stats`` | print statistics for the deleted archive |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--list`` | output verbose list of archives it keeps/prunes |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--short`` | use a less wide archive part format |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--list-pruned`` | output verbose list of archives it prunes |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--list-kept`` | output verbose list of archives it keeps |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--format FORMAT`` | specify format for the archive part (default: "{archive:<36} {time} [{id}]") |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--keep-within INTERVAL`` | keep all archives within this time interval |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--keep-last``, ``--keep-secondly`` | number of secondly archives to keep |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--keep-minutely`` | number of minutely archives to keep |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | | ``-H``, ``--keep-hourly`` | number of hourly archives to keep |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | | ``-d``, ``--keep-daily`` | number of daily archives to keep |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | | ``-w``, ``--keep-weekly`` | number of weekly archives to keep |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | | ``-m``, ``--keep-monthly`` | number of monthly archives to keep |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | | ``-y``, ``--keep-yearly`` | number of yearly archives to keep |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | | ``-c SECONDS``, ``--checkpoint-interval SECONDS`` | write checkpoint every SECONDS seconds (Default: 1800) |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | .. class:: borg-common-opt-ref |
|
|
|
- | |
|
|
|
- | :ref:`common_options` |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | **Archive filters** — Archive filters can be applied to repository targets. |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | | ``-a PATTERN``, ``--match-archives PATTERN`` | only consider archive names matching the pattern. see "borg help match-archives". |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--oldest TIMESPAN`` | consider archives between the oldest archive's timestamp and (oldest + TIMESPAN), e.g. 7d or 12m. |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--newest TIMESPAN`` | consider archives between the newest archive's timestamp and (newest - TIMESPAN), e.g. 7d or 12m. |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--older TIMESPAN`` | consider archives older than (now - TIMESPAN), e.g. 7d or 12m. |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--newer TIMESPAN`` | consider archives newer than (now - TIMESPAN), e.g. 7d or 12m. |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | **optional arguments** |
|
|
|
+ +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``-n``, ``--dry-run`` | do not change repository |
|
|
|
+ +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--list`` | output verbose list of archives it keeps/prunes |
|
|
|
+ +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--short`` | use a less wide archive part format |
|
|
|
+ +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--list-pruned`` | output verbose list of archives it prunes |
|
|
|
+ +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--list-kept`` | output verbose list of archives it keeps |
|
|
|
+ +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--format FORMAT`` | specify format for the archive part (default: "{archive:<36} {time} [{id}]") |
|
|
|
+ +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--keep-within INTERVAL`` | keep all archives within this time interval |
|
|
|
+ +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--keep-last``, ``--keep-secondly`` | number of secondly archives to keep |
|
|
|
+ +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--keep-minutely`` | number of minutely archives to keep |
|
|
|
+ +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``-H``, ``--keep-hourly`` | number of hourly archives to keep |
|
|
|
+ +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``-d``, ``--keep-daily`` | number of daily archives to keep |
|
|
|
+ +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``-w``, ``--keep-weekly`` | number of weekly archives to keep |
|
|
|
+ +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``-m``, ``--keep-monthly`` | number of monthly archives to keep |
|
|
|
+ +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``-y``, ``--keep-yearly`` | number of yearly archives to keep |
|
|
|
+ +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | .. class:: borg-common-opt-ref |
|
|
|
+ | |
|
|
|
+ | :ref:`common_options` |
|
|
|
+ +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | **Archive filters** — Archive filters can be applied to repository targets. |
|
|
|
+ +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``-a PATTERN``, ``--match-archives PATTERN`` | only consider archive names matching the pattern. see "borg help match-archives". |
|
|
|
+ +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--oldest TIMESPAN`` | consider archives between the oldest archive's timestamp and (oldest + TIMESPAN), e.g. 7d or 12m. |
|
|
|
+ +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--newest TIMESPAN`` | consider archives between the newest archive's timestamp and (newest - TIMESPAN), e.g. 7d or 12m. |
|
|
|
+ +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--older TIMESPAN`` | consider archives older than (now - TIMESPAN), e.g. 7d or 12m. |
|
|
|
+ +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--newer TIMESPAN`` | consider archives newer than (now - TIMESPAN), e.g. 7d or 12m. |
|
|
|
+ +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
|
|
|
.. raw:: html
|
|
|
|
|
@@ -80,8 +74,6 @@ borg prune
|
|
|
|
|
|
optional arguments
|
|
|
-n, --dry-run do not change repository
|
|
|
- --force force pruning of corrupted archives, use ``--force --force`` in case ``--force`` does not work.
|
|
|
- -s, --stats print statistics for the deleted archive
|
|
|
--list output verbose list of archives it keeps/prunes
|
|
|
--short use a less wide archive part format
|
|
|
--list-pruned output verbose list of archives it prunes
|
|
@@ -95,7 +87,6 @@ borg prune
|
|
|
-w, --keep-weekly number of weekly archives to keep
|
|
|
-m, --keep-monthly number of monthly archives to keep
|
|
|
-y, --keep-yearly number of yearly archives to keep
|
|
|
- -c SECONDS, --checkpoint-interval SECONDS write checkpoint every SECONDS seconds (Default: 1800)
|
|
|
|
|
|
|
|
|
:ref:`common_options`
|
|
@@ -122,11 +113,6 @@ certain number of historic backups. This retention policy is commonly referred t
|
|
|
`GFS <https://en.wikipedia.org/wiki/Backup_rotation_scheme#Grandfather-father-son>`_
|
|
|
(Grandfather-father-son) backup rotation scheme.
|
|
|
|
|
|
-Also, prune automatically removes checkpoint archives (incomplete archives left
|
|
|
-behind by interrupted backup runs) except if the checkpoint is the latest
|
|
|
-archive (and thus still needed). Checkpoint archives are not considered when
|
|
|
-comparing archive counts against the retention limits (``--keep-X``).
|
|
|
-
|
|
|
If you use --match-archives (-a), then only archives that match the pattern are
|
|
|
considered for deletion and only those archives count towards the totals
|
|
|
specified by the rules.
|
|
@@ -162,11 +148,6 @@ The ``--keep-last N`` option is doing the same as ``--keep-secondly N`` (and it
|
|
|
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.
|
|
|
-
|
|
|
You can influence how the ``--list`` output is formatted by using the ``--short``
|
|
|
option (less wide output) or by giving a custom format using ``--format`` (see
|
|
|
the ``borg rlist`` description for more details about the format string).
|