From a57e87d21faaa48a4ac4d38eaf5f7a46966e5aaa Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Sat, 26 Aug 2023 15:56:21 -0700 Subject: [PATCH] Fix var path for adhoc backup jobs --- backups/backup.nomad | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backups/backup.nomad b/backups/backup.nomad index 8a28215..217ae56 100644 --- a/backups/backup.nomad +++ b/backups/backup.nomad @@ -95,7 +95,7 @@ MYSQL_PORT=3306 MYSQL_USER=root MYSQL_PASSWORD={{ .mysql_root_password }} {{ end -}} -{{ with nomadVar (print "nomad/jobs/" (env "NOMAD_JOB_ID")) -}} +{{ with nomadVar (print "nomad/jobs/" (index (env "NOMAD_JOB_ID" | split "/") 0)) -}} BACKUP_PASSPHRASE={{ .backup_passphrase }} RCLONE_FTP_HOST={{ .nas_ftp_host }} RCLONE_FTP_USER={{ .nas_ftp_user }} @@ -181,7 +181,7 @@ PSKsecrets = {{ env "NOMAD_SECRETS_DIR" }}/mysql_stunnel_psk.txt # Probably should use variable ACLs to grant each node job to this path template { data = <