From 3edc723bf00c1abce9db40bdf4a018d5a60dc432 Mon Sep 17 00:00:00 2001 From: plumbeo Date: Fri, 16 Nov 2018 17:35:33 +0100 Subject: [PATCH] Update 'restic forget --keep-within' documentation and add changelog entry --- changelog/unreleased/issue-2089 | 9 +++++++++ doc/060_forget.rst | 5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 changelog/unreleased/issue-2089 diff --git a/changelog/unreleased/issue-2089 b/changelog/unreleased/issue-2089 new file mode 100644 index 000000000..d867c4fa4 --- /dev/null +++ b/changelog/unreleased/issue-2089 @@ -0,0 +1,9 @@ +Enhancement: increase granularity of the "keep within" retention policy + +The `keep-within` option of the `forget` command now accepts time ranges with +an hourly granularity. For example, running `restic forget --keep-within 3d12h` +will keep all the snapshots made within three days and twelve hours from the +time of the latest snapshot. + +https://github.com/restic/restic/issues/2089 +https://github.com/restic/restic/pull/2090 diff --git a/doc/060_forget.rst b/doc/060_forget.rst index 7222c1711..a1edc55fc 100644 --- a/doc/060_forget.rst +++ b/doc/060_forget.rst @@ -168,8 +168,9 @@ The ``forget`` command accepts the following parameters: this option (can be specified multiple times). - ``--keep-within duration`` keep all snapshots which have been made within the duration of the latest snapshot. ``duration`` needs to be a number of - years, months, and days, e.g. ``2y5m7d`` will keep all snapshots made in the - two years, five months, and seven days before the latest snapshot. + years, months, days, and hours, e.g. ``2y5m7d3h`` will keep all snapshots + made in the two years, five months, seven days, and three hours before the + latest snapshot. Multiple policies will be ORed together so as to be as inclusive as possible for keeping snapshots.