updated borg state
This commit is contained in:
parent
a9f6bc4f94
commit
7efc411963
@ -34,7 +34,7 @@ def email_errors(fromaddr, toaddrs, subject, data_str, smtp_server):
|
||||
if error or changes:
|
||||
js = subprocess.check_output(["salt-run", "--out=json",
|
||||
"jobs.lookup_jid", data['jid']])
|
||||
body = f"JobId is data['jid']\n"
|
||||
body = "JobId is data['jid']\n"
|
||||
outdata = json.loads(js)
|
||||
nodename = outdata.keys()[0]
|
||||
for i in outdata[nodename]:
|
||||
|
@ -58,6 +58,9 @@ borg prune \
|
||||
--keep-weekly {{ job.keep_weekly|default(4) }} \
|
||||
--keep-monthly {{ job.keep_monthly|default(6) }} \
|
||||
|
||||
info "Cleaning up logs"
|
||||
find {{ working_dir }}/logs/${backup_name}-*.log -mtime +{{ job.keep_logs_days|default(7) }} -delete
|
||||
|
||||
prune_exit=$?
|
||||
|
||||
global_exit=$(( backup_exit > prune_exit ? backup_exit : prune_exit ))
|
||||
|
Loading…
Reference in New Issue
Block a user