From 4d6773c2340e5bd3d86cf186688c6de911f9ee61 Mon Sep 17 00:00:00 2001 From: Alban Date: Thu, 11 Jul 2019 20:13:47 +0000 Subject: [PATCH] [fix] custom borg template to backup / with one filesystem only --- templates/borg-backup.sh.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/borg-backup.sh.j2 b/templates/borg-backup.sh.j2 index 0f712bf..dd3cdfe 100644 --- a/templates/borg-backup.sh.j2 +++ b/templates/borg-backup.sh.j2 @@ -86,7 +86,7 @@ if [ "$1" = "backup" ] REPOSITORY={{ b.user }}@{{ b.fqdn }}:{{ b.home }}{{ b.pool }}/{{ inventory_hostname }} {% endif %} - /usr/local/bin/borg create --progress --compression {{ borgbackup_compression }} --stats {{ b.options }} $REPOSITORY::$date {% for dir in borgbackup_include %}{{ dir }} {% endfor %}{% if automysql.stat.isdir is defined and automysql.stat.isdir == True %}/var/lib/automysqlbackup{% endif %} {% for dir in borgbackup_exclude %} --exclude '{{ dir }}'{% endfor %} + /usr/local/bin/borg create -x --progress --compression {{ borgbackup_compression }} --stats {{ b.options }} $REPOSITORY::$date {% for dir in borgbackup_include %}{{ dir }} {% endfor %}{% if automysql.stat.isdir is defined and automysql.stat.isdir == True %}/var/lib/automysqlbackup{% endif %} {% for dir in borgbackup_exclude %} --exclude '{{ dir }}'{% endfor %} if [ "$?" -eq "0" ]; then printf "Backup succeeded on $date to {{ b.fqdn }}\n" >> /var/log/borg-backup.log; fi