diff --git a/scripts/dump-db.sh b/scripts/dump-db.sh new file mode 100755 index 00000000..189d4aa7 --- /dev/null +++ b/scripts/dump-db.sh @@ -0,0 +1,3 @@ +#!/bin/sh +docker-compose -f "$(dirname $0)/../docker-compose.yml" exec -u postgres db pg_dump postgres + diff --git a/scripts/rclone-db.sh b/scripts/rclone-db.sh new file mode 100755 index 00000000..b9fa5689 --- /dev/null +++ b/scripts/rclone-db.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# 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 +