Is the default for retention and forget to forget all snapshots?
From the documentation the default for each of the following is 0, then says to specify "unlimited" to keep all. Is this a documentation issues or is the default to forget everything? If so would it be better to default to "unlimited"?
Hey!
This is a great question 😉
The idea here is to keep restic defaults: no flag will be generated on the command line when no option is specified.
You can see if you run the forget command while no policy has been defined:
[...]
2025/07/16 20:25:39 profile 'no-forget': starting 'forget'
2025/07/16 20:25:39 command environment: reusing previous
2025/07/16 20:25:39 starting command: /usr/local/bin/restic forget --password-file=examples/key --repo=/Volumes/RAMDisk/testing --verbose=1
repository 9ef53ef0 opened (version 2, compression level auto)
created new cache in /Users/cp/Library/Caches/restic
Fatal: no policy was specified, no snapshots will be removed
2025/07/16 20:25:40 forget on profile 'no-forget': exit status 1
As you can see, restic refuses to delete any snapshots 👍🏻
This is a great point: I should add this information to the documentation 😄
That's reassuring. I read more about it here https://restic.readthedocs.io/en/latest/060_forget.html#removing-all-snapshots.
I can PR for the docs it if it's not generated.
I can PR for the docs it if it's not generated.
Please do 👍🏻