mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Make backup script more robust
This commit is contained in:
parent
5118a17b84
commit
a674b98c80
1 changed files with 9 additions and 1 deletions
|
|
@ -4,4 +4,12 @@
|
|||
# eg. rclone-db.sh b2:pluralkit
|
||||
|
||||
FILENAME=pluralkit-$(date -u +"%Y-%m-%dT%H:%M:%S").sql.gz
|
||||
$(dirname $0)/dump-db.sh | gzip | rclone rcat $1/$FILENAME
|
||||
|
||||
echo Dumping database to /tmp/$FILENAME...
|
||||
$(dirname $0)/dump-db.sh | gzip > /tmp/$FILENAME
|
||||
|
||||
echo Transferring to remote $1...
|
||||
rclone -P copy /tmp/$FILENAME $1
|
||||
|
||||
echo Cleaning up...
|
||||
rm /tmp/$FILENAME
|
||||
Loading…
Add table
Add a link
Reference in a new issue