From 0ef6ae2bacb099ef1ace7ee85f49cbc44e51c481 Mon Sep 17 00:00:00 2001 From: Ludovic Cartier Date: Tue, 24 Dec 2024 15:50:32 +0100 Subject: [PATCH] template brain_backup - add condition for backup_id --- templates/brain_backup.j2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/brain_backup.j2 b/templates/brain_backup.j2 index 16facf8..d67f104 100644 --- a/templates/brain_backup.j2 +++ b/templates/brain_backup.j2 @@ -84,7 +84,9 @@ find $backup_dir -type d -ctime +$backup_local_retention -exec rm -rf {} \; ## send to PBS ## /usr/bin/proxmox-backup-client backup slash.pxar:/ \ ---backup-id {{ backup_host_id | default({{ ansible_hostname }}) }} \ +{% if backup_host_id is defined %} +--backup-id {{ backup_host_id }} \ +{% endif %} {% if backup_path_include is defined %} {% for item in backup_path_include %} {% if item.fs_mount is defined %}--include-dev {{ item.path }} \{% endif %}