updated borg state
This commit is contained in:
parent
5b44c8f142
commit
801f8590ab
@ -27,6 +27,11 @@ info "Starting backup"
|
|||||||
info "Init repository backup"
|
info "Init repository backup"
|
||||||
borg init --encryption={{ job.encryption|default('repokey-blake2') }}
|
borg init --encryption={{ job.encryption|default('repokey-blake2') }}
|
||||||
|
|
||||||
|
info "Starting before tasks"
|
||||||
|
{%- for task in job.before_tasks|default([]) %}
|
||||||
|
{{ task }}
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
info "Creating new archive"
|
info "Creating new archive"
|
||||||
borg create \
|
borg create \
|
||||||
--verbose \
|
--verbose \
|
||||||
@ -61,6 +66,11 @@ borg prune \
|
|||||||
info "Cleaning up logs"
|
info "Cleaning up logs"
|
||||||
find {{ working_dir }}/logs/${backup_name}-*.log -mtime +{{ job.keep_logs_days|default(7) }} -delete
|
find {{ working_dir }}/logs/${backup_name}-*.log -mtime +{{ job.keep_logs_days|default(7) }} -delete
|
||||||
|
|
||||||
|
info "Starting after tasks"
|
||||||
|
{%- for task in job.after_tasks|default([]) %}
|
||||||
|
{{ task }}
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
prune_exit=$?
|
prune_exit=$?
|
||||||
|
|
||||||
global_exit=$(( backup_exit > prune_exit ? backup_exit : prune_exit ))
|
global_exit=$(( backup_exit > prune_exit ? backup_exit : prune_exit ))
|
||||||
|
Loading…
Reference in New Issue
Block a user