Skip to content

Commit

Permalink
Adding last variables in Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
JS Fillman committed May 10, 2024
1 parent c3d1a04 commit c6338bb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
8 changes: 5 additions & 3 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_ |
Expand All @@ -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

Expand Down
10 changes: 7 additions & 3 deletions app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_ |
Expand All @@ -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

Expand Down

0 comments on commit c6338bb

Please sign in to comment.