aboutsummaryrefslogtreecommitdiff
path: root/cluster/prod/app/backup/deploy/backup-daily.hcl
diff options
context:
space:
mode:
Diffstat (limited to 'cluster/prod/app/backup/deploy/backup-daily.hcl')
-rw-r--r--cluster/prod/app/backup/deploy/backup-daily.hcl53
1 files changed, 49 insertions, 4 deletions
diff --git a/cluster/prod/app/backup/deploy/backup-daily.hcl b/cluster/prod/app/backup/deploy/backup-daily.hcl
index f3da8aa..fb301e1 100644
--- a/cluster/prod/app/backup/deploy/backup-daily.hcl
+++ b/cluster/prod/app/backup/deploy/backup-daily.hcl
@@ -1,5 +1,5 @@
job "backup_daily" {
- datacenters = ["orion", "neptune"]
+ datacenters = ["orion", "neptune", "scorpio"]
type = "batch"
priority = "60"
@@ -44,7 +44,7 @@ EOH
resources {
cpu = 500
memory = 100
- memory_max = 300
+ memory_max = 1000
}
restart {
@@ -90,7 +90,7 @@ EOH
resources {
cpu = 500
memory = 100
- memory_max = 300
+ memory_max = 1000
}
restart {
@@ -227,7 +227,52 @@ EOH
resources {
cpu = 500
- memory = 200
+ memory = 100
+ memory_max = 1000
+ }
+
+ restart {
+ attempts = 2
+ interval = "30m"
+ delay = "15s"
+ mode = "fail"
+ }
+ }
+ }
+
+ group "backup-garage" {
+ constraint {
+ attribute = "${attr.unique.hostname}"
+ operator = "="
+ value = "abricot"
+ }
+
+ task "main" {
+ driver = "docker"
+
+ config {
+ image = "lxpz/backup_garage:4"
+ network_mode = "host"
+ volumes = [
+ "/mnt/storage/backup/garage.deuxfleurs.fr:/backup"
+ ]
+ }
+
+ template {
+ data = <<EOH
+BACKUP_BASEDIR=/backup
+GARAGE_ADMIN_TOKEN={{ key "secrets/garage/admin_token" }}
+GARAGE_ACCESS_KEY={{ key "secrets/backup/garage/s3_access_key_id" }}
+GARAGE_SECRET_KEY={{ key "secrets/backup/garage/s3_secret_access_key" }}
+EOH
+ destination = "secrets/env_vars"
+ env = true
+ }
+
+ resources {
+ cpu = 500
+ memory = 100
+ memory_max = 1000
}
restart {