|
@@ -8,7 +8,7 @@ LOG_FILE="/var/log/rclone/rclone-$(date +%Y-%m-%d).log"
|
|
{% for container in containers %}
|
|
{% for container in containers %}
|
|
{% if container.volumes is defined %}
|
|
{% if container.volumes is defined %}
|
|
{% for volume in container.volumes %}
|
|
{% for volume in container.volumes %}
|
|
-{% if backups_ignore not in volume|regex_replace(':.*') %}
|
|
|
|
|
|
+{% if volume|regex_replace(':.*') not in backups_ignore %}
|
|
echo "Starting backup of '{{ container.name }}:{{ volume | regex_replace(':.*') }}'." | ts >> "$LOG_FILE"
|
|
echo "Starting backup of '{{ container.name }}:{{ volume | regex_replace(':.*') }}'." | ts >> "$LOG_FILE"
|
|
/usr/bin/rclone copy {{ volume | regex_replace(':.*') }}/ b2-container-data:current/{{ ansible_hostname }}/{{ container.name }}/{{ volume | regex_replace(':.*') | basename }} \
|
|
/usr/bin/rclone copy {{ volume | regex_replace(':.*') }}/ b2-container-data:current/{{ ansible_hostname }}/{{ container.name }}/{{ volume | regex_replace(':.*') | basename }} \
|
|
--backup-dir=b2-container-data:old/{{ ansible_hostname }}/{{ container.name }}/{{ volume | regex_replace(':.*') | basename }} \
|
|
--backup-dir=b2-container-data:old/{{ ansible_hostname }}/{{ container.name }}/{{ volume | regex_replace(':.*') | basename }} \
|