mirror of
https://github.com/tiredofit/docker-db-backup.git
synced 2025-12-22 13:44:08 +01:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca31eb840d | ||
|
|
6bec188633 | ||
|
|
43562077b0 | ||
|
|
c39bdeebae | ||
|
|
36b5909483 | ||
|
|
6033b1b0a9 |
@@ -1,3 +1,10 @@
|
||||
## 2.11.1 2022-01-20 <jacksgt@github>
|
||||
|
||||
### Changed
|
||||
- Modernized S3 variables and sanity checks
|
||||
- Change exit code to 0 when executing a manual backup
|
||||
|
||||
|
||||
## 2.11.0 2022-01-20 <dave at tiredofit dot ca>
|
||||
|
||||
### Added
|
||||
|
||||
@@ -135,7 +135,10 @@ Be sure to view the following repositories to understand all the customizable op
|
||||
| `SPLIT_DB` | If using root as username and multiple DBs on system, set to TRUE to create Seperate DB Backups instead of all in one. | `FALSE` |
|
||||
| `TEMP_LOCATION` | Perform Backups and Compression in this temporary directory | `/tmp/backups/` |
|
||||
|
||||
When using compression with MongoDB, only `GZ` compression is possible.
|
||||
- When using compression with MongoDB, only `GZ` compression is possible.
|
||||
- You may need to wrap your `DB_DUMP_BEGIN` value in quotes for it to properly parse. There have been reports of backups that start with a `0` get converted into a different format which will not allow the timer to start at the correct time.
|
||||
|
||||
|
||||
|
||||
#### Backing Up to S3 Compatible Services
|
||||
|
||||
@@ -143,8 +146,8 @@ If `BACKUP_LOCATION` = `S3` then the following options are used.
|
||||
|
||||
| Parameter | Description |
|
||||
| --------------- | --------------------------------------------------------------------------------------- |
|
||||
| `S3_BUCKET` | S3 Bucket name e.g. 'mybucket' |
|
||||
| `S3_HOST` | Hostname of S3 Server e.g "s3.amazonaws.com" - You can also include a port if necessary |
|
||||
| `S3_BUCKET` | S3 Bucket name e.g. `mybucket` |
|
||||
| `S3_ENDPOINT` | URL of S3-compatible endpoint, e.g. `http://minio:8080` |
|
||||
| `S3_KEY_ID` | S3 Key ID |
|
||||
| `S3_KEY_SECRET` | S3 Key Secret |
|
||||
| `S3_PATH` | S3 Pathname to save to e.g. '`backup`' |
|
||||
|
||||
@@ -82,13 +82,12 @@ SIZE_VALUE=${SIZE_VALUE:-"bytes"}
|
||||
SPLIT_DB=${SPLIT_DB:-"FALSE"}
|
||||
TEMP_LOCATION=${TEMP_LOCATION:-"/tmp/backups"}
|
||||
|
||||
if [ "$BACKUP_TYPE" = "S3" ] || [ "$BACKUP_TYPE" = "s3" ] || [ "$BACKUP_TYPE" = "MINIO" ] || [ "$BACKUP_TYPE" = "minio" ] ; then
|
||||
if [ "$BACKUP_LOCATION" = "S3" ] || [ "$BACKUP_LOCATION" = "s3" ] || [ "$BACKUP_LOCATION" = "MINIO" ] || [ "$BACKUP_LOCATION" = "minio" ] ; then
|
||||
S3_PROTOCOL=${S3_PROTOCOL:-"https"}
|
||||
sanity_var S3_HOST "S3 Host"
|
||||
sanity_var S3_ENDPOINT "S3 Endpoint URL"
|
||||
sanity_var S3_BUCKET "S3 Bucket"
|
||||
sanity_var S3_KEY_ID "S3 Key ID"
|
||||
sanity_var S3_KEY_SECRET "S3 Key Secret"
|
||||
sanity_var S3_URI_STYLE "S3 URI Style (Virtualhost or Path)"
|
||||
sanity_var S3_PATH "S3 Path"
|
||||
sanity_var S3_REGION "S3 Region"
|
||||
file_env 'S3_KEY_ID'
|
||||
@@ -529,7 +528,7 @@ print_debug "Backup routines Initialized on $(date)"
|
||||
|
||||
### Go back to Sleep until next Backup time
|
||||
if var_true $MANUAL ; then
|
||||
exit 1;
|
||||
exit 0;
|
||||
else
|
||||
sleep $(($DB_DUMP_FREQ*60))
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user