diff --git a/backups/backup.nomad b/backups/backup.nomad index 564b0b0..2ffb178 100644 --- a/backups/backup.nomad +++ b/backups/backup.nomad @@ -44,6 +44,11 @@ job "backup%{ if batch_node != null }-oneoff-${batch_node}%{ endif }" { source = "all-volumes" } + ephemeral_disk { + # Try to keep restic cache intact + sticky = true + } + service { name = "backup" provider = "nomad" @@ -84,6 +89,7 @@ job "backup%{ if batch_node != null }-oneoff-${batch_node}%{ endif }" { "RCLONE_CHECKERS" = "2" "RCLONE_TRANSFERS" = "2" "RCLONE_FTP_CONCURRENCY" = "5" + "RESTIC_CACHE_DIR" = "$${NOMAD_ALLOC_DIR}/data" } template { @@ -113,7 +119,6 @@ RCLONE_FTP_NO_CHECK_CERTIFICATE=true env = true } - template { # Build jobs based on node data = <