Workaround restic output inconsistency: NPF-RESTIC-00001

This commit is contained in:
Orsiris de Jong 2024-11-03 14:37:56 +01:00
parent a2c145f787
commit d76dea3599

View file

@ -1129,7 +1129,9 @@ class ResticRunner:
if cmds:
for cmd in cmds:
result, output = self.executor(cmd)
if result:
# NPF-RESTIC-00001
# restic output inconsistency: non existing snapshot IDs still produce exit code 0
if result and not "no matching ID found for prefix" in output:
msg = f"successfully {'applied retention policy' if policy else 'forgot snapshot'}"
self.write_logs(
msg,