template brain_backup - handle var condition correctly

This commit is contained in:
Ludovic Cartier 2024-12-24 09:54:15 +01:00
parent 3c86586974
commit f47d6bcebb

View File

@ -60,7 +60,6 @@ mkdir -p $backup_dir/$today/mysql
for db in $mysql_databases; for db in $mysql_databases;
do mysqldump -e -q -Q --lock-tables $db | gzip -c > $backup_dir/$today/mysql/dump_$db.sql.gz; do mysqldump -e -q -Q --lock-tables $db | gzip -c > $backup_dir/$today/mysql/dump_$db.sql.gz;
done done
## end of mysql ## ## end of mysql ##
{% endif %} {% endif %}
@ -85,15 +84,15 @@ find $backup_dir -type d -ctime +$backup_local_retention -exec rm -rf {} \;
## send to PBS ## ## send to PBS ##
/usr/bin/proxmox-backup-client backup slash.pxar:/ \ /usr/bin/proxmox-backup-client backup slash.pxar:/ \
{% if backup_path_include %} {% if backup_path_include is defined %}
{% for item in backup_path_include %} {% for item in backup_path_include %}
{% if item.fs_mount %}--include-dev {{ item.path }} \{% endif %} {% if item.fs_mount %}--include-dev {{ item.path }} \{% endif %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if backup_pgsql_enabled %} {% if backup_pgsql_enabled is sameas true %}
postgresql.pxar:$backup_dir/$today/postgresql \ postgresql.pxar:$backup_dir/$today/postgresql \
{% endif %} {% endif %}
{% if backup_mysql_enabled %} {% if backup_mysql_enabled is sameas true %}
mysql.pxar:$backup_dir/$today/mysql \ mysql.pxar:$backup_dir/$today/mysql \
{% endif %} {% endif %}
--rate ${PBS_RATE} --rate ${PBS_RATE}