aboutsummaryrefslogtreecommitdiff
path: root/app/build/backup-consul/do_backup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'app/build/backup-consul/do_backup.sh')
-rwxr-xr-xapp/build/backup-consul/do_backup.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/build/backup-consul/do_backup.sh b/app/build/backup-consul/do_backup.sh
index 049c998..4dbae2a 100755
--- a/app/build/backup-consul/do_backup.sh
+++ b/app/build/backup-consul/do_backup.sh
@@ -13,7 +13,8 @@ Host backuphost
User $TARGET_SSH_USER
EOF
-consul kv export > consul_kv_dump.json
-gzip consul_kv_dump.json
+consul kv export | \
+ gzip | \
+ age -r "$(cat /root/.ssh/id_ed25519.pub)" | \
+ ssh backuphost "cat > $TARGET_SSH_DIR/consul/consul_kv_export.gz.age"
-rsync -vvvz --progress consul_kv_dump.json.gz "backuphost:$TARGET_SSH_DIR/consul/"