job "backup_periodic" { datacenters = ["dc1"] type = "batch" periodic { // Launch every hour cron = "0 * * * * *" // Do not allow overlapping runs. prohibit_overlap = true } task "backup-consul" { driver = "docker" config { image = "lxpz/backup_consul:9" volumes = [ "secrets/id_ed25519:/root/.ssh/id_ed25519", "secrets/id_ed25519.pub:/root/.ssh/id_ed25519.pub", "secrets/known_hosts:/root/.ssh/known_hosts" ] network_mode = "host" } env { CONSUL_HTTP_ADDR = "http://consul.service.2.cluster.deuxfleurs.fr:8500" } template { data = <