From 1bb9c7ce192dc962da15d6e0662d36755c9511e0 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sun, 15 Nov 2020 20:14:19 +0100 Subject: [PATCH] Add timestamp to backup --- app/build/backup-consul/do_backup.sh | 2 +- app/deployment/backup.hcl | 2 +- 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",