Separate buckets for each file type

This commit is contained in:
Tyler Hallada 2022-06-30 01:29:54 -04:00
parent 4b7a52588c
commit 1c1303e4f6
2 changed files with 8 additions and 5 deletions

View File

@ -51,6 +51,9 @@ NEXUS_API_KEY=...
For these scripts to run successfully you will need to install rclone and setup a remote for `sync.sh` (the "static server") and a remote for `backup.sh` (the "backup server"). Remotes can be created with the `rclone config` command. Then, make sure these variables are defined in the `.env` file corresponding to the remote names and buckets (or folders) within that remote you created: For these scripts to run successfully you will need to install rclone and setup a remote for `sync.sh` (the "static server") and a remote for `backup.sh` (the "backup server"). Remotes can be created with the `rclone config` command. Then, make sure these variables are defined in the `.env` file corresponding to the remote names and buckets (or folders) within that remote you created:
- `STATIC_SERVER_REMOTE` - `STATIC_SERVER_REMOTE`
- `STATIC_SERVER_BUCKET` - `STATIC_SERVER_CELLS_BUCKET`
- `STATIC_SERVER_MODS_BUCKET`
- `STATIC_SERVER_PLUGINS_BUCKET`
- `STATIC_SERVER_FILES_BUCKET`
- `BACKUP_SERVER_REMOTE` - `BACKUP_SERVER_REMOTE`
- `BACKUP_SERVER_BUCKET` - `BACKUP_SERVER_BUCKET`

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
export $(grep -v '^#' .env | xargs -d '\n') export $(grep -v '^#' .env | xargs -d '\n')
rclone sync --fast-list --checksum cells ${STATIC_SERVER_REMOTE}:${STATIC_SERVER_BUCKET}/cells rclone sync --fast-list --checksum cells ${STATIC_SERVER_REMOTE}:${STATIC_SERVER_CELLS_BUCKET}/cells
rclone sync --fast-list --checksum mods ${STATIC_SERVER_REMOTE}:${STATIC_SERVER_BUCKET}/mods rclone sync --fast-list --checksum mods ${STATIC_SERVER_REMOTE}:${STATIC_SERVER_MODS_BUCKET}/mods
rclone sync --fast-list --checksum plugins_data ${STATIC_SERVER_REMOTE}:${STATIC_SERVER_BUCKET}/plugins_data rclone sync --fast-list --checksum plugins_data ${STATIC_SERVER_REMOTE}:${STATIC_SERVER_PLUGINS_BUCKET}/plugins_data
rclone sync --fast-list --checksum files ${STATIC_SERVER_REMOTE}:${STATIC_SERVER_BUCKET}/files rclone sync --fast-list --checksum files ${STATIC_SERVER_REMOTE}:${STATIC_SERVER_FILES_BUCKET}/files