Forget --prune not working on one of a dozen servers

If I run “restic forget --prune --keep-daily 7 --keep-weekly 5 --keep-monthly 12” on one of my servers resulting snapshot list keeps at:

ns1:~# restic snapshots | grep “/bin”
22ebf2e7 2020-03-31 22:03:01 ns1 /bin
e3402745 2020-04-30 22:03:01 ns1 /bin
49976415 2020-05-31 22:03:02 ns1 /bin
14f47112 2020-06-21 22:03:02 ns1 /bin
ee4f190d 2020-06-24 22:03:01 ns1 /bin
9e92558b 2020-06-30 22:03:01 ns1 /bin
b2c51694 2020-07-05 22:03:01 ns1 /bin
db5eeff8 2020-07-12 22:03:01 ns1 /bin
c4ba9e51 2020-07-13 22:03:02 ns1 /bin
11846eb6 2020-07-14 22:03:01 ns1 /bin
80c056da 2020-07-15 22:03:01 ns1 /bin
d7321539 2020-07-16 22:03:02 ns1 /bin
8383bf60 2020-07-17 22:03:01 ns1 /bin
1579ed35 2020-07-18 22:03:01 ns1 /bin
3b92b464 2020-07-19 22:03:01 ns1 /bin
11b626a3 2020-07-26 22:03:01 ns1 /bin
af8749c7 2020-07-27 22:03:02 ns1 /bin
bd40053c 2020-07-28 22:03:01 ns1 /bin
c66b7385 2020-07-29 22:03:02 ns1 /bin
f83cebba 2020-07-30 22:03:01 ns1 /bin
e8a5c47c 2020-07-31 22:03:01 ns1 /bin
c48b5178 2020-08-01 22:03:01 ns1 /bin
e5a585d6 2020-08-02 22:03:01 ns1 /bin

But the command returns “…15 snapshots”. Why it keeps 23? “restic check” don’t show anything problematic.

That looks rather strange, the output would make sense for something like --keep-daily 14 --keep-weekly 5 --keep-monthly 12 . Please provide the relevant part of the output of the forget command, which also contains a justification why each snapshot is kept.

ns1:~# restic forget --prune --keep-daily 7 --keep-weekly 5 --keep-monthly 12
repository 88784011 opened successfully, password is correct
Applying Policy: keep the last 7 daily, 5 weekly, 12 monthly snapshots
snapshots for (host [ns1], paths [/bin, /boot, /dev, /etc, /home, /lib, /lib32, /lib64, /mnt/data, /opt, /root, /sbin, /srv, /usr, /var]):

keep 8 snapshots:
ID Time Host Tags Reasons Paths

11b626a3 2020-07-26 22:03:01 ns1 weekly snapshot /bin
bd40053c 2020-07-28 22:03:01 ns1 daily snapshot /bin
c66b7385 2020-07-29 22:03:02 ns1 daily snapshot /bin
f83cebba 2020-07-30 22:03:01 ns1 daily snapshot /bin
e8a5c47c 2020-07-31 22:03:01 ns1 daily snapshot /bin
monthly snapshot /boot
c48b5178 2020-08-01 22:03:01 ns1 daily snapshot /bin
e5a585d6 2020-08-02 22:03:01 ns1 daily snapshot /bin
weekly snapshot /boot
829815a9 2020-08-03 22:03:01 ns1 daily snapshot /bin
weekly snapshot /boot
monthly snapshot /dev

8 snapshots

snapshots for (host [ns1], paths [/bin, /boot, /dev, /etc, /home, /lib, /lib32, /lib64, /opt, /root, /sbin, /srv, /usr, /var]):

keep 15 snapshots:
ID Time Host Tags Reasons Paths

22ebf2e7 2020-03-31 22:03:01 ns1 monthly snapshot /bin
e3402745 2020-04-30 22:03:01 ns1 monthly snapshot /bin
49976415 2020-05-31 22:03:02 ns1 monthly snapshot /bin
14f47112 2020-06-21 22:03:02 ns1 weekly snapshot /bin
ee4f190d 2020-06-24 22:03:01 ns1 weekly snapshot /bin
9e92558b 2020-06-30 22:03:01 ns1 monthly snapshot /bin
b2c51694 2020-07-05 22:03:01 ns1 weekly snapshot /bin
db5eeff8 2020-07-12 22:03:01 ns1 weekly snapshot /bin
c4ba9e51 2020-07-13 22:03:02 ns1 daily snapshot /bin
11846eb6 2020-07-14 22:03:01 ns1 daily snapshot /bin
80c056da 2020-07-15 22:03:01 ns1 daily snapshot /bin
d7321539 2020-07-16 22:03:02 ns1 daily snapshot /bin
8383bf60 2020-07-17 22:03:01 ns1 daily snapshot /bin
1579ed35 2020-07-18 22:03:01 ns1 daily snapshot /bin
3b92b464 2020-07-19 22:03:01 ns1 daily snapshot /bin
weekly snapshot /boot
monthly snapshot /dev

15 snapshots

Ok, now I see a difference in paths (/mnt/data). Do I need to mange snapshots manually by every change in inclusions or exclutions?

Add a
–group-by host
flag and the policy will be applied to all paths on the host, not individual sets.

Thats, what I’m looking for. Thanks.