Skip to content

Commit 7e64ee0

Browse files
authored
Merge pull request #32 from lawndoc/unlock-stale-locks
Unlock stale locks before forget and prune
2 parents f9316fa + c0a5fbe commit 7e64ee0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/restic_compose_backup/restic.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ def is_initialized(repository: str) -> bool:
7777

7878

7979
def forget(repository: str, daily: str, weekly: str, monthly: str, yearly: str):
80+
commands.run(restic(repository, [
81+
'unlock'
82+
]))
8083
return commands.run(restic(repository, [
8184
'forget',
8285
'--group-by',
@@ -93,6 +96,9 @@ def forget(repository: str, daily: str, weekly: str, monthly: str, yearly: str):
9396

9497

9598
def prune(repository: str):
99+
commands.run(restic(repository, [
100+
'unlock'
101+
]))
96102
return commands.run(restic(repository, [
97103
'prune',
98104
]))

0 commit comments

Comments
 (0)