From 5900c2aa23977438cf0f30e479cfa5a6984d7df1 Mon Sep 17 00:00:00 2001 From: Ske Date: Wed, 7 Nov 2018 21:16:34 +0100 Subject: [PATCH] Fix the backup scripts (cronjob didn't fire for a month...) --- scripts/dump-db.sh | 2 +- scripts/rclone-db.sh | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/dump-db.sh b/scripts/dump-db.sh index 189d4aa7..d794dab4 100755 --- a/scripts/dump-db.sh +++ b/scripts/dump-db.sh @@ -1,3 +1,3 @@ #!/bin/sh -docker-compose -f "$(dirname $0)/../docker-compose.yml" exec -u postgres db pg_dump postgres +docker-compose -f "$(dirname $0)/../docker-compose.yml" exec -T -u postgres db pg_dump postgres diff --git a/scripts/rclone-db.sh b/scripts/rclone-db.sh index b9fa5689..d15f0f44 100755 --- a/scripts/rclone-db.sh +++ b/scripts/rclone-db.sh @@ -3,6 +3,5 @@ # Usage: rclone-db.sh : # eg. rclone-db.sh b2:pluralkit -FILENAME=pluralkit-$(date +"%Y-%m-%dT%H:%M:%S").sql -$(dirname $0)/dump-db.sh | rclone rcat $1/$FILENAME - +FILENAME=pluralkit-$(date -u +"%Y-%m-%dT%H:%M:%S").sql.gz +$(dirname $0)/dump-db.sh | gzip | rclone rcat $1/$FILENAME