rustic icon indicating copy to clipboard operation
rustic copied to clipboard

feat(commands): Add lock command

Open aawsome opened this issue 1 year ago • 0 comments

This PR adds new commands to lock (parts of) the repository:

  • lock repository to 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 keys to lock all keys. This can invalidate key removal.
  • lock snapshots to 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 --until option.
  • [ ] 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

aawsome avatar Feb 16 '24 22:02 aawsome