My rentention policy is the following:
restic -r $RESTIC_REPOSITORY forget --keep-within 1m --prune
yet, the output of restic snapshots is the following:
Applying Policy: keep all snapshots within 1m of the newest
keep 1 snapshots:
ID Time Host Tags Reasons Paths
----------------------------------------------------------------------------------------------
458d9d2a 2024-01-27 17:13:23 host within 1m /home/.snapshots/11
----------------------------------------------------------------------------------------------
1 snapshots
keep 1 snapshots:
ID Time Host Tags Reasons Paths
-----------------------------------------------------------------------------------------------
7b671e1c 2024-03-08 12:35:55 host within 1m /home/.snapshots/346
-----------------------------------------------------------------------------------------------
1 snapshots
keep 1 snapshots:
ID Time Host Tags Reasons Paths
-----------------------------------------------------------------------------------------------
49d182c7 2024-02-29 19:26:01 host within 1m /home/.snapshots/281
-----------------------------------------------------------------------------------------------
1 snapshots
keep 1 snapshots:
ID Time Host Tags Reasons Paths
-----------------------------------------------------------------------------------------------
def595d3 2024-02-25 12:21:34 host within 1m /home/.snapshots/225
-----------------------------------------------------------------------------------------------
1 snapshots
keep 1 snapshots:
ID Time Host Tags Reasons Paths
----------------------------------------------------------------------------------------------
56972a3a 2024-01-31 20:16:16 host within 1m /home/.snapshots/49
----------------------------------------------------------------------------------------------
1 snapshots
keep 1 snapshots:
ID Time Host Tags Reasons Paths
-----------------------------------------------------------------------------------------------
5b3b4ec5 2024-02-09 12:00:01 host within 1m /home/.snapshots/100
-----------------------------------------------------------------------------------------------
1 snapshots
And we are march 8th 2024. Clearly, snapshot 458d9d2a should be deleted. Yet it keeps it with the reason that it is within 1m.
I read the doc, it should be working, so I don’t get it.
If those are all snapshots from different hosts, then according to the documentation then
and
While neither of these exactly apply to your situation, my guess would be that restic is not deleting the last snapshot from a host for safety reasons and you would need to delete those manually with a
restic -r /srv/restic-repo forget 458d9d2a