rustic
rustic copied to clipboard
feat(commands): Add lock command
This PR adds new commands to lock (parts of) the repository:
lock repositoryto lock the complete repository. This can invalidate update/remove operations; it is suggested to use https://github.com/rustic-rs/rustic_core/pull/164 to mark the repository append-only before doing this!lock keysto lock all keys. This can invalidate key removal.lock snapshotsto lock snapshots and needed pack files. This also sets an mark to the snapshots/pack files such that
see #1050
depends on https://github.com/rustic-rs/rustic_core/pull/163
Also fixes the handling of delete-protected snapshots in the forget command when snapshots are explicitly given
TODO:
- [ ] remove temporary Cargo.toml change once the above PR is merged into rustic_core
- [ ] Maybe add more options to specify the "until when" timestamp. e.g. a alternative
--untiloption. - [ ] Think about whether we want to require to have append-only mode for
lock repository. - [ ] Think about a similar mechanism only for keys to lock
- [ ] Maybe add possibility to only lock given keys