updated borg script template
This commit is contained in:
parent
74fcae4162
commit
466eaeefb0
@ -28,11 +28,16 @@ borg create \
|
|||||||
--stats \
|
--stats \
|
||||||
--show-rc \
|
--show-rc \
|
||||||
--compression {{ job.compression|default('lz4') }} \
|
--compression {{ job.compression|default('lz4') }} \
|
||||||
|
{%- if job.excluded_dirs is defined -%}
|
||||||
|
{%- for exclude in job.excluded_dirs %}
|
||||||
|
--exclude '{{ exclude }}' \
|
||||||
|
{%- endfor %}
|
||||||
|
{%- endif %}
|
||||||
--exclude-caches \
|
--exclude-caches \
|
||||||
::$backup_name'-{hostname}-{now}' \
|
::$backup_name'-{hostname}-{now}' \
|
||||||
{% for include in job.included_dirs -%}
|
{%- for include in job.included_dirs %}
|
||||||
{{ include }} \
|
{{ include }} \
|
||||||
{% endfor -%}
|
{%- endfor %}
|
||||||
2>> {{ working_dir }}/logs/${backup_name}-$(date +%Y-%m-%d).log
|
2>> {{ working_dir }}/logs/${backup_name}-$(date +%Y-%m-%d).log
|
||||||
|
|
||||||
backup_exit=$?
|
backup_exit=$?
|
||||||
|
Loading…
Reference in New Issue
Block a user