mirror of
https://github.com/tiredofit/docker-db-backup.git
synced 2025-12-21 21:33:28 +01:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7729743ccf | ||
|
|
d56efc0ee9 | ||
|
|
7d87e474e0 | ||
|
|
342c252d9a | ||
|
|
25f3cab21f | ||
|
|
e63d56c753 | ||
|
|
86722a8e8a | ||
|
|
4d6419fd18 | ||
|
|
99153ac6d1 |
18
CHANGELOG.md
18
CHANGELOG.md
@@ -1,3 +1,21 @@
|
||||
## 2.9.7 2021-12-15 <dave at tiredofit dot ca>
|
||||
|
||||
### Changed
|
||||
- Fixup for Zabbix Autoagent registration
|
||||
|
||||
|
||||
## 2.9.6 2021-12-03 <alexbarcello@githuba>
|
||||
|
||||
### Changed
|
||||
- Fix for S3 Minio backup targets
|
||||
- Fix for annoying output on certain target time print conditions
|
||||
|
||||
## 2.9.5 2021-12-07 <dave at tiredofit dot ca>
|
||||
|
||||
### Changed
|
||||
- Fix for 2.9.3
|
||||
|
||||
|
||||
## 2.9.4 2021-12-07 <dave at tiredofit dot ca>
|
||||
|
||||
### Added
|
||||
|
||||
@@ -147,7 +147,6 @@ If `BACKUP_LOCATION` = `S3` then the following options are used.
|
||||
| `S3_KEY_SECRET` | S3 Key Secret |
|
||||
| `S3_PATH` | S3 Pathname to save to e.g. '`backup`' |
|
||||
| `S3_PROTOCOL` | Use either `http` or `https` to access service - Default `https` |
|
||||
| `S3_URI_STYLE` | Choose either `VIRTUALHOST` or `PATH` style - Default `VIRTUALHOST` |
|
||||
|
||||
|
||||
## Maintenance
|
||||
|
||||
@@ -2,14 +2,16 @@
|
||||
|
||||
source /assets/functions/00-container
|
||||
prepare_service single
|
||||
PROCESS_NAME="monitoring"
|
||||
prepare_service 03-monitoring
|
||||
PROCESS_NAME="db-backup"
|
||||
output_off
|
||||
|
||||
if var_true "${CONTAINER_ENABLE_MONITORING}" && [ "${CONTAINER_MONITORING_BACKEND,,}" = "zabbix" ]; then
|
||||
source /assets/defaults/03-monitoring
|
||||
cat <<EOF > "${ZABBIX_CONFIG_PATH}"/"${ZABBIX_CONFIG_FILE}.d"/tiredofit_dbbackup.conf
|
||||
# Zabbix DB Backup Configuration - Automatically Generated
|
||||
# Find Companion Zabbix Server Templates at https://github.com/tiredofit/docker-dbbackup
|
||||
# Autoregister=dbbackup
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
liftoff
|
||||
|
||||
@@ -420,7 +420,10 @@ move_backup() {
|
||||
export AWS_ACCESS_KEY_ID=${S3_KEY_ID}
|
||||
export AWS_SECRET_ACCESS_KEY=${S3_KEY_SECRET}
|
||||
export AWS_DEFAULT_REGION=ap-northeast-2
|
||||
aws s3 cp ${tmpdir}/${target} s3://${S3_BUCKET}/${S3_PATH}/${target}
|
||||
|
||||
[[ ( -n "${S3_HOST}" ) ]] && PARAM_AWS_ENDPOINT_URL=" --endpoint-url ${S3_PROTOCOL}://${S3_HOST}"
|
||||
|
||||
aws ${PARAM_AWS_ENDPOINT_URL} s3 cp ${tmpdir}/${target} s3://${S3_BUCKET}/${S3_PATH}/${target}
|
||||
|
||||
rm -rf ${tmpdir}/*.md5
|
||||
rm -rf ${tmpdir}/"${target}"
|
||||
@@ -438,9 +441,10 @@ print_debug "Backup routines Initialized on $(date)"
|
||||
today=$(date +"%Y%m%d")
|
||||
|
||||
if [[ $DB_DUMP_BEGIN =~ ^\+(.*)$ ]]; then
|
||||
waittime=$(( ${BASH_REMATCH[1]} * 60 ))
|
||||
waittime=$(( ${BASH_REMATCH[1]} * 60 ))
|
||||
target_time=$(($current_time + $waittime))
|
||||
else
|
||||
target_time=$(date --date="${today}${DB_DUMP_BEGIN}" +"%s")
|
||||
target_time=$(date --date="${today}${DB_DUMP_BEGIN}" +"%s")
|
||||
if [[ "$target_time" < "$current_time" ]]; then
|
||||
target_time=$(($target_time + 24*60*60))
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user