Compare commits

..

11 Commits
2.9.2 ... 2.9.7

Author SHA1 Message Date
Dave Conroy
7729743ccf Release 2.9.7 - See CHANGELOG.md 2021-12-15 07:17:57 -08:00
Dave Conroy
d56efc0ee9 Release 2.9.6 - See CHANGELOG.md 2021-12-13 17:40:43 -08:00
Dave Conroy
7d87e474e0 Merge branch 'master' of https://github.com/tiredofit/docker-db-backup 2021-12-13 17:38:25 -08:00
Dave Conroy
342c252d9a Release 2.9.5 - See CHANGELOG.md 2021-12-13 17:33:14 -08:00
Dave Conroy
25f3cab21f Merge pull request #91 from alexbarcelo/minio_fix
MINIO support by reacting to S3_HOST
2021-12-13 17:30:50 -08:00
Dave Conroy
e63d56c753 Merge pull request #92 from alexbarcelo/targettimeprint
Fixing the print_notice for Next Backup when `DB_DUMP_BEGIN` is +XXX
2021-12-13 17:27:58 -08:00
Alex Barcelo
86722a8e8a defining target_time variable in that branch 2021-12-13 21:56:45 +01:00
Alex Barcelo
4d6419fd18 reacting to S3_HOST config envvar by setting the --endpoint-url parameter on AWS CLI 2021-12-13 21:49:02 +01:00
Dave Conroy
99153ac6d1 Release 2.9.5 2021-12-07 15:10:28 -08:00
Dave Conroy
142967135d Release 2.9.4 - See CHANGELOG.md 2021-12-07 15:02:47 -08:00
Dave Conroy
1df66853fb Release 2.9.3 - See CHANGELOG.md 2021-11-24 09:53:49 -08:00
5 changed files with 55 additions and 6 deletions

View File

@@ -1,3 +1,33 @@
## 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
- Add Zabbix auto register support for templates
## 2.9.3 2021-11-24 <dave at tiredofit dot ca>
### Added
- Alpine 3.15 base
## 2.9.2 2021-10-22 <teenigma@github> ## 2.9.2 2021-10-22 <teenigma@github>
### Fixed ### Fixed

View File

@@ -1,4 +1,4 @@
FROM docker.io/tiredofit/alpine:3.14 FROM docker.io/tiredofit/alpine:3.15
### Set Environment Variables ### Set Environment Variables
ENV MSSQL_VERSION=17.8.1.1-1 \ ENV MSSQL_VERSION=17.8.1.1-1 \

View File

@@ -147,7 +147,6 @@ If `BACKUP_LOCATION` = `S3` then the following options are used.
| `S3_KEY_SECRET` | S3 Key Secret | | `S3_KEY_SECRET` | S3 Key Secret |
| `S3_PATH` | S3 Pathname to save to e.g. '`backup`' | | `S3_PATH` | S3 Pathname to save to e.g. '`backup`' |
| `S3_PROTOCOL` | Use either `http` or `https` to access service - Default `https` | | `S3_PROTOCOL` | Use either `http` or `https` to access service - Default `https` |
| `S3_URI_STYLE` | Choose either `VIRTUALHOST` or `PATH` style - Default `VIRTUALHOST` |
## Maintenance ## Maintenance

View File

@@ -0,0 +1,17 @@
#!/usr/bin/with-contenv bash
source /assets/functions/00-container
prepare_service single
prepare_service 03-monitoring
PROCESS_NAME="db-backup"
output_off
if var_true "${CONTAINER_ENABLE_MONITORING}" && [ "${CONTAINER_MONITORING_BACKEND,,}" = "zabbix" ]; then
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
liftoff

View File

@@ -1,7 +1,6 @@
#!/usr/bin/with-contenv bash #!/usr/bin/with-contenv bash
source /assets/functions/00-container source /assets/functions/00-container
PROCESS_NAME="db-backup" PROCESS_NAME="db-backup"
date >/dev/null date >/dev/null
@@ -421,7 +420,10 @@ move_backup() {
export AWS_ACCESS_KEY_ID=${S3_KEY_ID} export AWS_ACCESS_KEY_ID=${S3_KEY_ID}
export AWS_SECRET_ACCESS_KEY=${S3_KEY_SECRET} export AWS_SECRET_ACCESS_KEY=${S3_KEY_SECRET}
export AWS_DEFAULT_REGION=ap-northeast-2 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}/*.md5
rm -rf ${tmpdir}/"${target}" rm -rf ${tmpdir}/"${target}"
@@ -439,9 +441,10 @@ print_debug "Backup routines Initialized on $(date)"
today=$(date +"%Y%m%d") today=$(date +"%Y%m%d")
if [[ $DB_DUMP_BEGIN =~ ^\+(.*)$ ]]; then if [[ $DB_DUMP_BEGIN =~ ^\+(.*)$ ]]; then
waittime=$(( ${BASH_REMATCH[1]} * 60 )) waittime=$(( ${BASH_REMATCH[1]} * 60 ))
target_time=$(($current_time + $waittime))
else 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 if [[ "$target_time" < "$current_time" ]]; then
target_time=$(($target_time + 24*60*60)) target_time=$(($target_time + 24*60*60))
fi fi