mirror of
https://github.com/tiredofit/docker-db-backup.git
synced 2025-12-22 13:44:08 +01:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
077201cd18 | ||
|
|
eeaf59dc6f | ||
|
|
88fe0d6411 | ||
|
|
366c4759a5 | ||
|
|
37f255ec99 | ||
|
|
efa9a678c0 | ||
|
|
68747a4aff | ||
|
|
cf736278bb | ||
|
|
1659e34fc7 |
18
CHANGELOG.md
18
CHANGELOG.md
@@ -1,3 +1,21 @@
|
|||||||
|
## 3.7.7 2023-03-20 <codemonium@github>
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Simplify pg_isready usage
|
||||||
|
|
||||||
|
|
||||||
|
## 3.7.6 2023-03-14 <toshy@github>
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Remove EXTRA_OPT variable from MySQL/MariaDB check
|
||||||
|
|
||||||
|
|
||||||
|
## 3.7.5 2023-03-02 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Add support for Docker Swarm mode Secrets for BLOBXFER_STORAGE_ACCOUNT_*_FILE
|
||||||
|
|
||||||
|
|
||||||
## 3.7.4 2023-02-22 <gbe0@github>
|
## 3.7.4 2023-02-22 <gbe0@github>
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ The following directories are used for configuration and can be mapped for persi
|
|||||||
|
|
||||||
#### Base Images used
|
#### Base Images used
|
||||||
|
|
||||||
This image relies on an [Alpine Linux](https://hub.docker.com/r/tiredofit/alpine) or [Debian Linux](https://hub.docker.com/r/tiredofit/debian) base image that relies on an [init system](https://github.com/just-containers/s6-overlay) for added capabilities. Outgoing SMTP capabilities are handlded via `msmtp`. Individual container performance monitoring is performed by [zabbix-agent](https://zabbix.org). Additional tools include: `bash`,`curl`,`less`,`logrotate`, `nano`,`vim`.
|
This image relies on an [Alpine Linux](https://hub.docker.com/r/tiredofit/alpine) or [Debian Linux](https://hub.docker.com/r/tiredofit/debian) base image that relies on an [init system](https://github.com/just-containers/s6-overlay) for added capabilities. Outgoing SMTP capabilities are handlded via `msmtp`. Individual container performance monitoring is performed by [zabbix-agent](https://zabbix.org). Additional tools include: `bash`,`curl`,`less`,`logrotate`, `nano`.
|
||||||
|
|
||||||
Be sure to view the following repositories to understand all the customizable options:
|
Be sure to view the following repositories to understand all the customizable options:
|
||||||
|
|
||||||
@@ -246,7 +246,7 @@ docker exec -it (whatever your container name is) bash
|
|||||||
### Manual Backups
|
### Manual Backups
|
||||||
Manual Backups can be performed by entering the container and typing `backup-now`
|
Manual Backups can be performed by entering the container and typing `backup-now`
|
||||||
|
|
||||||
- Recently there was a request to have the container work with Kukbernetes cron scheduling. This can theoretically be accomplished by setting the container `MODE=MANUAL` and then setting `MANUAL_RUN_FOREVER=FALSE` - You would also want to disable a few features from the upstream base images specifically `CONTAINER_ENABLE_SCHEDULING` and `CONTAINER_ENABLE_MONITORING`. This should allow the container to start, execute a backup by executing and then exit cleanly. An alternative way to running the script is to execute `/etc/services.available/10-db-backup/run`.
|
- Recently there was a request to have the container work with Kubernetes cron scheduling. This can theoretically be accomplished by setting the container `MODE=MANUAL` and then setting `MANUAL_RUN_FOREVER=FALSE` - You would also want to disable a few features from the upstream base images specifically `CONTAINER_ENABLE_SCHEDULING` and `CONTAINER_ENABLE_MONITORING`. This should allow the container to start, execute a backup by executing and then exit cleanly. An alternative way to running the script is to execute `/etc/services.available/10-db-backup/run`.
|
||||||
|
|
||||||
### Restoring Databases
|
### Restoring Databases
|
||||||
Entering in the container and executing `restore` will execute a menu based script to restore your backups - MariaDB, Postgres, and Mongo supported.
|
Entering in the container and executing `restore` will execute a menu based script to restore your backups - MariaDB, Postgres, and Mongo supported.
|
||||||
|
|||||||
@@ -104,6 +104,11 @@ bootstrap_variables() {
|
|||||||
file_env 'S3_KEY_ID'
|
file_env 'S3_KEY_ID'
|
||||||
file_env 'S3_KEY_SECRET'
|
file_env 'S3_KEY_SECRET'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${BACKUP_LOCATION,,}" = "blobxfer" ] && [ -n "${BLOBXFER_STORAGE_ACCOUNT_FILE}" ] && [ -n "${BLOBXFER_STORAGE_ACCOUNT_KEY_FILE}" ]; then
|
||||||
|
file_env 'BLOBXFER_STORAGE_ACCOUNT_FILE'
|
||||||
|
file_env 'BLOBXFER_STORAGE_ACCOUNT_KEY_FILE'
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
backup_couch() {
|
backup_couch() {
|
||||||
@@ -416,7 +421,7 @@ check_availability() {
|
|||||||
"mysql" )
|
"mysql" )
|
||||||
counter=0
|
counter=0
|
||||||
export MYSQL_PWD=${DB_PASS}
|
export MYSQL_PWD=${DB_PASS}
|
||||||
while ! (mysqladmin -u"${DB_USER}" -P"${DB_PORT}" -h"${DB_HOST}" ${mysql_tls_args} ${EXTRA_OPTS} status > /dev/null 2>&1) ; do
|
while ! (mysqladmin -u"${DB_USER}" -P"${DB_PORT}" -h"${DB_HOST}" ${mysql_tls_args} status > /dev/null 2>&1) ; do
|
||||||
sleep 5
|
sleep 5
|
||||||
(( counter+=5 ))
|
(( counter+=5 ))
|
||||||
print_warn "MySQL/MariaDB Server '${DB_HOST}' is not accessible, retrying.. (${counter} seconds so far)"
|
print_warn "MySQL/MariaDB Server '${DB_HOST}' is not accessible, retrying.. (${counter} seconds so far)"
|
||||||
@@ -432,8 +437,7 @@ check_availability() {
|
|||||||
;;
|
;;
|
||||||
"pgsql" )
|
"pgsql" )
|
||||||
counter=0
|
counter=0
|
||||||
export PGPASSWORD=${DB_PASS}
|
until pg_isready --host=${DB_HOST} --port=${DB_PORT} -q
|
||||||
until pg_isready --dbname=${DB_NAME} --host=${DB_HOST} --port=${DB_PORT} --username=${DB_USER} -q
|
|
||||||
do
|
do
|
||||||
sleep 5
|
sleep 5
|
||||||
(( counter+=5 ))
|
(( counter+=5 ))
|
||||||
|
|||||||
Reference in New Issue
Block a user