2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-01 16:40:50 +00:00

Improve documentation, add explanation and weekly

This commit is contained in:
Alexander Neumann 2016-08-21 11:53:05 +02:00
parent 84c14e623d
commit 78c0995853

View File

@ -464,6 +464,8 @@ The `forget` command accepts the following parameters:
only the last snapshot for each hour.
* `--keep-daily n` for the last `n` days which have one or more snapshots, only
keep the last one for that day.
* `--keep-weekly n` for the last `n` weeks which have one or more snapshots, only
keep the last one for that week.
* `--keep-monthly n` for the last `n` months which have one or more snapshots, only
keep the last one for that month.
* `--keep-yearly n` for the last `n` years which have one or more snapshots, only
@ -472,6 +474,17 @@ The `forget` command accepts the following parameters:
Additionally, you can restrict removing snapshots to those which have a
particular hostname with the `--hostname` parameter.
All the `--keep-*` options above only count hours/days/weeks/months/years which
have a snapshot, so those without a snapshot are ignored.
Let's explain this with an example: Suppose you have only made a backup on each
Sunday for 12 weeks. Then `forget --keep-daily 4` will keep the last four snapshots
for the last four Sundays, but remove the rest. Only counting the days which
have a backup and ignore the ones without is a safety feature: it prevents
restic from removing many snapshots when no new ones are created. If it was
implemented otherwise, running `forget --keep-daily 4` on a Friday would remove
all snapshots!
# Debugging restic
The program can be built with debug support like this: