Add scripts for updating and backing up data
This commit is contained in:
parent
4d9855552b
commit
eb92f7191d
7
scripts/backup.sh
Normal file
7
scripts/backup.sh
Normal 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
|
4
scripts/sync.sh
Normal file
4
scripts/sync.sh
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
export $(grep -v '^#' .env | xargs -d '\n')
|
||||||
|
rsync -raz -e "ssh -p ${STATIC_SERVER_PORT}" cells ${STATIC_SERVER_USER}@${STATIC_SERVER_HOST}:/srv/
|
||||||
|
rsync -raz -e "ssh -p ${STATIC_SERVER_PORT}" mods ${STATIC_SERVER_USER}@${STATIC_SERVER_HOST}:/srv/
|
9
scripts/update.sh
Normal file
9
scripts/update.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
mkdir -p logs
|
||||||
|
./target/release/mod-mapper &>> logs/modmapper.log
|
||||||
|
mkdir -p cells
|
||||||
|
mkdir -p mods
|
||||||
|
./target/release/mod-mapper -e cells/edits.json
|
||||||
|
./target/release/mod-mapper -c cells
|
||||||
|
./target/release/mod-mapper -s mods/mod_search_index.json
|
||||||
|
./target/release/mod-mapper -m mods
|
Loading…
Reference in New Issue
Block a user