|
@@ -12,43 +12,51 @@ borg prune
|
|
|
|
|
|
.. class:: borg-options-table
|
|
|
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------+
|
|
|
- | **options** |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------+
|
|
|
- | | ``-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 |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------+
|
|
|
- | | ``--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". |
|
|
|
- +-----------------------------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------+
|
|
|
+ +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | **options** |
|
|
|
+ +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``-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 |
|
|
|
+ +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--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 oder 12m. |
|
|
|
+ +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
+ | | ``--newer TIMESPAN`` | consider archives newer than (now - TIMESPAN), e.g. 7d or 12m. |
|
|
|
+ +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
|
|
|
.. raw:: html
|
|
|
|
|
@@ -83,6 +91,10 @@ borg prune
|
|
|
|
|
|
Archive filters
|
|
|
-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 oder 12m.
|
|
|
+ --newer TIMESPAN consider archives newer than (now - TIMESPAN), e.g. 7d or 12m.
|
|
|
|
|
|
|
|
|
Description
|
|
@@ -126,12 +138,12 @@ 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).
|
|
|
The rules are applied from secondly to yearly, and backups selected by previous
|
|
|
rules do not count towards those of later rules. The time that each backup
|
|
|
-starts is used for pruning purposes. Dates and times are interpreted in
|
|
|
-the local timezone, and weeks go from Monday to Sunday. Specifying a
|
|
|
-negative number of archives to keep means that there is no limit. As of borg
|
|
|
-1.2.0, borg will retain the oldest archive if any of the secondly, minutely,
|
|
|
-hourly, daily, weekly, monthly, or yearly rules was not otherwise able to meet
|
|
|
-its retention target. This enables the first chronological archive to continue
|
|
|
+starts is used for pruning purposes. Dates and times are interpreted in the local
|
|
|
+timezone of the system where borg prune runs, and weeks go from Monday to Sunday.
|
|
|
+Specifying a negative number of archives to keep means that there is no limit.
|
|
|
+As of borg 1.2.0, borg will retain the oldest archive if any of the secondly,
|
|
|
+minutely, 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-last N`` option is doing the same as ``--keep-secondly N`` (and it will
|