Fix the backup scripts (cronjob didn't fire for a month...)

This commit is contained in:
Ske 2018-11-07 21:16:34 +01:00
parent ce319408a6
commit 5900c2aa23
2 changed files with 3 additions and 4 deletions

View File

@ -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

View File

@ -3,6 +3,5 @@
# Usage: rclone-db.sh <remote>:<path>
# 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