Add scripts for updating and backing up data

This commit is contained in:
2022-02-12 00:44:32 -05:00
parent 4d9855552b
commit eb92f7191d
3 changed files with 20 additions and 0 deletions

7
scripts/backup.sh Normal file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
export $(grep -v '^#' .env | xargs -d '\n')
mkdir -p backups
zip -r -9 backups/plugins.zip plugins -DF --out backups/plugins-update.zip
pg_dump -U modmapper -Fc modmapper > backups/modmapper-$(date +'%Y-%m-%d').dump
find backups/modmapper-*.dump -mtime +30 --type f --delete
rclone sync backups/* dropbox:modmapper