Add emergency repository unlock

This commit is contained in:
Mikei386
2026-06-21 13:59:10 +02:00
parent 84df215ad0
commit 92ba5ce05f
11 changed files with 68 additions and 9 deletions
+4
View File
@@ -106,6 +106,10 @@ func (r *Runner) Unlock(ctx context.Context, repo model.Repository) error {
return r.run(ctx, repo, []string{"unlock"}, nil, nil)
}
func (r *Runner) ForceUnlock(ctx context.Context, repo model.Repository) error {
return r.run(ctx, repo, []string{"unlock", "--remove-all"}, nil, nil)
}
func (r *Runner) ChangePassword(ctx context.Context, repo model.Repository, currentPassword, newPassword string) error {
newPasswordPath, cleanup, err := r.writePasswordFile("restic-new-password-*", newPassword)
if err != nil {