template brain_backup - add condition for var backup_path_include

This commit is contained in:
Ludovic Cartier 2024-12-24 09:51:24 +01:00
parent a8ce0ef7c7
commit 3c86586974

View File

@ -85,9 +85,11 @@ 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 %}
{% 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 %}
{% if backup_pgsql_enabled %} {% if backup_pgsql_enabled %}
postgresql.pxar:$backup_dir/$today/postgresql \ postgresql.pxar:$backup_dir/$today/postgresql \
{% endif %} {% endif %}