Why do restic forget need repository password when specifying snapshot ID

Hi. Have used restic for a few months now
Just ran restic -r rclone:remote:directory forget <snapshotID> And it asked for a repository password. I don’t know if repo password is actually needed to remove a snapshot (when snapshot ID given), but AFAIK it isn’t. If repo password is not needed please consider developing the program in a way that it does not ask repo password when not needed. However I know restic forget can be used with --prune or the other flags needing repo password and of course it should be asked then.
Not a serious problem, but inconvenient anyways, especially when removing multiple snapshots by hand

1 Like

You can make things much more comfortable with different options like storing your password in a file ( --password-file) or using environment variables.

Aside from that, I don’t share your opinion. Every change to the repo should be authenticated.

1 Like

This will change soon with password-less repos i think.

Removing files requires restic to lock the repository first, which requires the password to create a lock file.

It might be possible to loosen that restriction in the future. But it’s not entirely trivial as removing a snapshot file without coordination can cause problems when for example snapshots are listed concurrently.

2 Likes

OK I didn’t know that. Thanks for pointing out why repository password is needed.

1 Like