Add basic backup shell scripts
This commit is contained in:
parent
a866b7cb4c
commit
31322f3fea
3
scripts/dump-db.sh
Executable file
3
scripts/dump-db.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
docker-compose -f "$(dirname $0)/../docker-compose.yml" exec -u postgres db pg_dump postgres
|
||||||
|
|
8
scripts/rclone-db.sh
Executable file
8
scripts/rclone-db.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user