updated borg script template

This commit is contained in:
Paul 2020-10-01 23:07:04 +02:00
parent 74fcae4162
commit 466eaeefb0

View File

@ -28,11 +28,16 @@ borg create \
--stats \
--show-rc \
--compression {{ job.compression|default('lz4') }} \
{%- if job.excluded_dirs is defined -%}
{%- for exclude in job.excluded_dirs %}
--exclude '{{ exclude }}' \
{%- endfor %}
{%- endif %}
--exclude-caches \
::$backup_name'-{hostname}-{now}' \
{% for include in job.included_dirs -%}
::$backup_name'-{hostname}-{now}' \
{%- for include in job.included_dirs %}
{{ include }} \
{% endfor -%}
{%- endfor %}
2>> {{ working_dir }}/logs/${backup_name}-$(date +%Y-%m-%d).log
backup_exit=$?