consul backup in nomad
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
vincent 2023-11-01 19:30:39 +01:00
parent bed1a666da
commit db8b2c3b1e
3 changed files with 36 additions and 2 deletions

View File

@ -15,7 +15,6 @@ wireguard_postdown:
- iptables -D FORWARD -i wg0 -j ACCEPT
- iptables -D FORWARD -o wg0 -j ACCEPT
- iptables -t nat -D POSTROUTING -o enp2s0 -j MASQUERADE
consul_snapshot: True
partition_table:
- device: "/dev/sda"

View File

@ -12,4 +12,3 @@ wireguard_postdown:
- iptables -D FORWARD -i wg0 -j ACCEPT
- iptables -D FORWARD -o wg0 -j ACCEPT
- iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
consul_snapshot: True

View File

@ -0,0 +1,36 @@
job "consul-backup" {
datacenters = ["homelab"]
priority = 50
type = "batch"
meta {
forcedeploy = "0"
}
constraint {
attribute = "${attr.cpu.arch}"
value = "amd64"
}
periodic {
crons = ["30 3 * * *"]
prohibit_overlap = true
}
group "consul-backup" {
network {
mode = "host"
}
task "consul-backup" {
driver = "docker"
config {
image = "ducampsv/docker-consul-backup:latest"
volumes = [
"/mnt/diskstation/git/backup/consul:/backup"
]
}
resources {
memory = 100
}
}
}
}