Clarification on rotation/retention of backup

I’ve implemented this here: https://github.com/restic/restic/pull/1876, please let me know what you think

Sample run:

$ ./restic forget --explain --dry-run --keep-daily 7 --keep-weekly 4 --keep-monthly 1

repository 559c5ffa opened successfully, password is correct
Applying Policy: keep the last 7 daily, 4 weekly, 1 monthly snapshots
snapshots for (host [mopped], paths [/home/fd0/work/restic]):
keep 9 snapshots:
ID        Date                 Host        Tags        Directory
----------------------------------------------------------------------
b06c68f1  2018-06-17 19:00:00  mopped                  /home/fd0/work/restic
                    daily snapshot
                    weekly snapshot
                    monthly snapshot

93636576  2018-06-24 19:00:00  mopped                  /home/fd0/work/restic
                    daily snapshot
                    weekly snapshot

948e8801  2018-06-26 19:00:00  mopped                  /home/fd0/work/restic
                    daily snapshot

058e4f60  2018-06-27 19:00:00  mopped                  /home/fd0/work/restic
                    daily snapshot

13023ad3  2018-06-28 19:00:00  mopped                  /home/fd0/work/restic
                    daily snapshot

b0870185  2018-06-29 19:00:00  mopped                  /home/fd0/work/restic
                    daily snapshot

7c333b49  2018-06-30 19:00:00  mopped                  /home/fd0/work/restic
                    daily snapshot

6d965b57  2018-07-01 19:00:00  mopped                  /home/fd0/work/restic
                    weekly snapshot

f5dc9c02  2018-07-02 19:00:00  mopped                  /home/fd0/work/restic
                    weekly snapshot
----------------------------------------------------------------------
9 snapshots
remove 2 snapshots:
ID        Date                 Host        Tags        Directory
----------------------------------------------------------------------
8f40d1f8  2018-06-10 19:00:00  mopped                  /home/fd0/work/restic
376c64d4  2018-06-25 19:00:00  mopped                  /home/fd0/work/restic
----------------------------------------------------------------------
2 snapshots
1 Like