From c6338bbcb5f1c265cbc754a73b3e28937eaca363 Mon Sep 17 00:00:00 2001 From: JS Fillman Date: Fri, 10 May 2024 11:13:30 -0500 Subject: [PATCH] Adding last variables in Readme --- Readme.md | 8 +++++--- app/README.md | 10 +++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Readme.md b/Readme.md index 5598658..096a968 100644 --- a/Readme.md +++ b/Readme.md @@ -14,6 +14,7 @@ The script uses the following environment variables: | `DELETE_DUMP` | Optionally deletes exports under `$DUMP_BASE` when done compressing | _Unused_ | | `DUMP_BASE` | Base directory for dumps | `/dump/full_backup` | | `DUMP_RETENTION` | Retention policy for dumps | 3 | +| `ENABLE_UPLOAD` | Remote storage details | `true` | | `REMOTE` | Remote storage details | `remote:${BUCKET}/${BUCKETPATH}` | | `SECRET` | Encryption key for 7z files | | | `SLACK_CHANNEL` | Slack channel for notifications | _Unused_ | @@ -27,9 +28,10 @@ The script uses the following environment variables: The script performs the following steps: 1. **Cleanup**: Removes old zip files and backup dumps based on the retention policies set in the environment variables. -2. **Checksumming**: Retrieves a list of remote backups and downloads the MD5 checksums for each remote backup into a temporary directory. It then compares the checksums of local zip files against the remote MD5 checksums, adding any files that don't match to an upload list. -3. **Create Upload List**: Verifies and updates the list of files to upload. For each file in the upload list, it compares the local and remote MD5 checksums. If there's a mismatch, it increments the filename and adds it to the final upload list. This incrementing process continues until it finds a filename that doesn't conflict with existing files in the remote storage. -4. **Upload**: Uploads the files in the final upload list to the remote storage using the `rclone` command. +2. **Zip**: Creates `.7z` archives of dump dirs (formatted as `YYYY-MM-DD`) in the `$DUMP_BASE`. +3. **Checksum**: Retrieves a list of remote backups and downloads the MD5 checksums for each remote backup into a temporary directory. It then compares the checksums of local zip files against the remote MD5 checksums, adding any files that don't match to an upload list. +4. **Create Upload List**: Verifies and updates the list of files to upload. For each file in the upload list, it compares the local and remote MD5 checksums. If there's a mismatch, it increments the filename and adds it to the final upload list. This incrementing process continues until it finds a filename that doesn't conflict with existing files in the remote storage. +5. **Upload**: Uploads the files in the final upload list to the remote storage using the `rclone` command. ## Dockerfile diff --git a/app/README.md b/app/README.md index c7dc47b..460c9aa 100644 --- a/app/README.md +++ b/app/README.md @@ -13,6 +13,7 @@ The script uses the following environment variables: | `DELETE_DUMP` | Optionally deletes exports under `$DUMP_BASE` when done compressing | _Unused_ | | `DUMP_BASE` | Base directory for dumps | `/dump/full_backup` | | `DUMP_RETENTION` | Retention policy for dumps | 3 | +| `ENABLE_UPLOAD` | Remote storage details | `true` | | `REMOTE` | Remote storage details | `remote:${BUCKET}/${BUCKETPATH}` | | `SECRET` | Encryption key for 7z files | | | `SLACK_CHANNEL` | Slack channel for notifications | _Unused_ | @@ -21,14 +22,17 @@ The script uses the following environment variables: | `ZIP_DIR` | Directory for zip files | `/zip` | | `ZIP_RETENTION` | Retention policy for zip files | 4 | + ## Workflow The script performs the following steps: 1. **Cleanup**: Removes old zip files and backup dumps based on the retention policies set in the environment variables. -2. **Checksumming**: Retrieves a list of remote backups and downloads the MD5 checksums for each remote backup into a temporary directory. It then compares the checksums of local zip files against the remote MD5 checksums, adding any files that don't match to an upload list. -3. **Create Upload List**: Verifies and updates the list of files to upload. For each file in the upload list, it compares the local and remote MD5 checksums. If there's a mismatch, it increments the filename and adds it to the final upload list. This incrementing process continues until it finds a filename that doesn't conflict with existing files in the remote storage. -4. **Upload**: Uploads the files in the final upload list to the remote storage using the `rclone` command. +2. **Zip**: Creates `.7z` archives of dump dirs (formatted as `YYYY-MM-DD`) in the `$DUMP_BASE`. +3. **Checksum**: Retrieves a list of remote backups and downloads the MD5 checksums for each remote backup into a temporary directory. It then compares the checksums of local zip files against the remote MD5 checksums, adding any files that don't match to an upload list. +4. **Create Upload List**: Verifies and updates the list of files to upload. For each file in the upload list, it compares the local and remote MD5 checksums. If there's a mismatch, it increments the filename and adds it to the final upload list. This incrementing process continues until it finds a filename that doesn't conflict with existing files in the remote storage. +5. **Upload**: Uploads the files in the final upload list to the remote storage using the `rclone` command. + ## Dockerfile