Output for Applying Policy missing some info

Hi,

I noticed, that when using “restic forget” the info about the applied policy does not show all policy.

restic 0.18.0 compiled with go1.24.1 on linux/amd64

restic forget --prune --dry-run --keep-tag tagtokeep --keep-within-monthly 3y --host hostname

repository f2b4cbee opened (version 2, compression level auto)
Applying Policy: keep monthly snapshots within 3y and all snapshots with tags [[tagtokeep]]

Here the --host restriction is not shown.
When I run

restic forget --prune --dry-run --tag tagtokeep --keep-within-monthly 3y --host hostname

repository f2b4cbee opened (version 2, compression level auto)
Applying Policy: keep monthly snapshots within 3y

Here the --host AND the --tag restrictions are not shown.

This is probably caused by the fact, that only keep-policies are shown in the Applying Policy line? Is it possible to add the other possible tags as well? IMHO it would be helpful to see all applied parameters there so you can be sure they were used.

Best regards
Daniel

You are right that the --tag and --host options are not part of the policy and for that reason aren’t mentioned in the “Applying Policy” output.

I’m not sure it makes a lot of sense to add all applied parameters to this command specifically. It might generally be better to have such detailed output (all parameters and their value) be part of some debug or verbose output and not the normal output.

Either way, you could see if there’s already a similar feature request in the restic repository at GitHub and open a new one if there isn’t. That’s the place to discuss new features :slight_smile: