aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-11-15 20:14:19 +0100
committerAlex Auvolat <alex@adnab.me>2020-11-15 20:14:19 +0100
commit1bb9c7ce192dc962da15d6e0662d36755c9511e0 (patch)
tree2b7bc8d41bf29f54143d374c8bff4527dfee1492
parentf931dd939cd5109906399bd470497c9831e5d2f7 (diff)
downloadinfrastructure-1bb9c7ce192dc962da15d6e0662d36755c9511e0.tar.gz
infrastructure-1bb9c7ce192dc962da15d6e0662d36755c9511e0.zip
Add timestamp to backup
-rwxr-xr-xapp/build/backup-consul/do_backup.sh2
-rw-r--r--app/deployment/backup.hcl2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/build/backup-consul/do_backup.sh b/app/build/backup-consul/do_backup.sh
index 4dbae2a..a34e7b7 100755
--- a/app/build/backup-consul/do_backup.sh
+++ b/app/build/backup-consul/do_backup.sh
@@ -16,5 +16,5 @@ EOF
consul kv export | \
gzip | \
age -r "$(cat /root/.ssh/id_ed25519.pub)" | \
- ssh backuphost "cat > $TARGET_SSH_DIR/consul/consul_kv_export.gz.age"
+ ssh backuphost "cat > $TARGET_SSH_DIR/consul/$(date --iso-8601=minute)_consul_kv_export.gz.age"
diff --git a/app/deployment/backup.hcl b/app/deployment/backup.hcl
index d0c3fc8..08fd923 100644
--- a/app/deployment/backup.hcl
+++ b/app/deployment/backup.hcl
@@ -15,7 +15,7 @@ job "backup_periodic" {
driver = "docker"
config {
- image = "lxpz/backup_consul:11"
+ image = "lxpz/backup_consul:12"
volumes = [
"secrets/id_ed25519:/root/.ssh/id_ed25519",
"secrets/id_ed25519.pub:/root/.ssh/id_ed25519.pub",