Use rclone for sync, add more instructions

This commit is contained in:
2022-06-29 16:36:32 -04:00
parent 09c87fa93b
commit 4b7a52588c
3 changed files with 16 additions and 5 deletions

View File

@@ -4,4 +4,4 @@ mkdir -p backups
zip -r -9 backups/plugins.zip plugins -DF --out backups/plugins-update.zip
pg_dump -h localhost -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
rclone sync backups ${BACKUP_SERVER_REMOTE}:${BACKUP_SERVER_BUCKET}

View File

@@ -1,6 +1,6 @@
#!/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/
rsync -raz -e "ssh -p ${STATIC_SERVER_PORT}" plugins_data ${STATIC_SERVER_USER}@${STATIC_SERVER_HOST}:/srv/
rsync -raz -e "ssh -p ${STATIC_SERVER_PORT}" files ${STATIC_SERVER_USER}@${STATIC_SERVER_HOST}:/srv/
rclone sync --fast-list --checksum cells ${STATIC_SERVER_REMOTE}:${STATIC_SERVER_BUCKET}/cells
rclone sync --fast-list --checksum mods ${STATIC_SERVER_REMOTE}:${STATIC_SERVER_BUCKET}/mods
rclone sync --fast-list --checksum plugins_data ${STATIC_SERVER_REMOTE}:${STATIC_SERVER_BUCKET}/plugins_data
rclone sync --fast-list --checksum files ${STATIC_SERVER_REMOTE}:${STATIC_SERVER_BUCKET}/files