Skip to content

Commit

Permalink
fix: include 'latest' option in restic stats command for accurate bac…
Browse files Browse the repository at this point in the history
…kup status
  • Loading branch information
stephdl committed Nov 15, 2024
1 parent 88ac270 commit 23bbb6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/imageroot/usr/local/agent/bin/module-backup
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ except subprocess.CalledProcessError as ex:
time_end = int(time.time())
wrdb = agent.redis_connect(privileged = True)
backup_status = {}
stats_proc = agent.run_restic(rdb, repository, repopath, [], ["stats", "--json"], text=True, stdout=subprocess.PIPE)
stats_proc = agent.run_restic(rdb, repository, repopath, [], ["stats", "--json", "latest"], text=True, stdout=subprocess.PIPE)
if stats_proc.returncode == 0:
backup_status = json.loads(stats_proc.stdout)
backup_status['start'] = time_start
Expand Down

0 comments on commit 23bbb6f

Please sign in to comment.