job "batch-seedboxsync" { datacenters = ["homelab"] priority = 50 type = "batch" meta { forcedeploy = "0" } constraint { attribute = "${node.class}" operator = "set_contains" value = "cluster" } constraint { attribute = "${attr.cpu.arch}" value = "amd64" } periodic { crons = ["0,30 * * * *"] prohibit_overlap = true } group "seedboxsync" { network { mode = "host" } vault { policies = ["seedbox"] } task "rsync" { driver = "docker" service { name = "seedboxsync" } config { image = "ducampsv/rsync:latest" volumes = [ "/mnt/diskstation/download:/media", "local/id_rsa:/home/rsyncuser/.ssh/id_rsa" ] command = "rsync" args = [ "--info=progress2", "-e" , "ssh -p23 -o StrictHostKeyChecking=no", "-a", "${USERNAME}@${REMOTE_SERVER}:${REMOTE_PATH}", "/media", "--exclude=seed", "--remove-source-files", "-v" ] } env { RSYNC_UID = 1000001 RSYNC_GID = 1000007 } template { data = <