mirror of
https://github.com/tiredofit/docker-db-backup.git
synced 2025-12-22 21:53:42 +01:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cb5347afe5 | ||
|
|
ca03c5369d | ||
|
|
3008d9125f | ||
|
|
19cf3d007f | ||
|
|
0bbf142349 | ||
|
|
1bc357866f | ||
|
|
b38ad7a5cc |
10
CHANGELOG.md
10
CHANGELOG.md
@@ -1,3 +1,13 @@
|
|||||||
|
## 2.2.2 2020-09-22 <tpansino@github>
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Patch for 2.2.0 release fixing Docker Secrets Support. Was skipping password check.
|
||||||
|
|
||||||
|
## 2.2.1 2020-09-17 <alwynpan@github>
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Ondemand/Manual backup with `backup-now` was throwing errors not being able to find a proper date
|
||||||
|
|
||||||
## 2.2.0 2020-09-14 <alwynpan@github>
|
## 2.2.0 2020-09-14 <alwynpan@github>
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ Currently backs up CouchDB, InfluxDB, MySQL, MongoDB, Postgres, Redis servers.
|
|||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
|
- [hub.docker.com/r/tiredofit/db-backup](#hubdockercomrtiredofitdb-backup)
|
||||||
- [Introduction](#introduction)
|
- [Introduction](#introduction)
|
||||||
- [Authors](#authors)
|
- [Authors](#authors)
|
||||||
- [Table of Contents](#table-of-contents)
|
- [Table of Contents](#table-of-contents)
|
||||||
@@ -90,8 +91,6 @@ The following directories are used for configuration and can be mapped for persi
|
|||||||
|
|
||||||
### Environment Variables
|
### Environment Variables
|
||||||
|
|
||||||
*If you are trying to backup a database that doesn't have a user or a password (you should!) make sure you set `CONTAINER_ENABLE_DOCKER_SECRETS=FALSE`*
|
|
||||||
|
|
||||||
Along with the Environment Variables from the [Base image](https://hub.docker.com/r/tiredofit/alpine), below is the complete list of available options that can be used to customize your installation.
|
Along with the Environment Variables from the [Base image](https://hub.docker.com/r/tiredofit/alpine), below is the complete list of available options that can be used to customize your installation.
|
||||||
|
|
||||||
| Parameter | Description |
|
| Parameter | Description |
|
||||||
|
|||||||
@@ -33,23 +33,23 @@ case "$dbtype" in
|
|||||||
"mongo" | "mongodb" | "MONGO" | "MONGODB" )
|
"mongo" | "mongodb" | "MONGO" | "MONGODB" )
|
||||||
dbtype=mongo
|
dbtype=mongo
|
||||||
dbport=${DB_PORT:-27017}
|
dbport=${DB_PORT:-27017}
|
||||||
[[ ( -n "${DB_USER}" ) ]] && file_env 'DB_USER'
|
[[ ( -n "${DB_USER}" ) || ( -n "${DB_USER_FILE}" ) ]] && file_env 'DB_USER'
|
||||||
[[ ( -n "${DB_PASS}" ) ]] && file_env 'DB_PASS'
|
[[ ( -n "${DB_PASS}" ) || ( -n "${DB_PASS_FILE}" ) ]] && file_env 'DB_PASS'
|
||||||
;;
|
;;
|
||||||
"mysql" | "MYSQL" | "mariadb" | "MARIADB")
|
"mysql" | "MYSQL" | "mariadb" | "MARIADB")
|
||||||
dbtype=mysql
|
dbtype=mysql
|
||||||
dbport=${DB_PORT:-3306}
|
dbport=${DB_PORT:-3306}
|
||||||
[[ ( -n "${DB_PASS}" ) ]] && file_env 'DB_PASS'
|
[[ ( -n "${DB_PASS}" ) || ( -n "${DB_PASS_FILE}" ) ]] && file_env 'DB_PASS'
|
||||||
;;
|
;;
|
||||||
"postgres" | "postgresql" | "pgsql" | "POSTGRES" | "POSTGRESQL" | "PGSQL" )
|
"postgres" | "postgresql" | "pgsql" | "POSTGRES" | "POSTGRESQL" | "PGSQL" )
|
||||||
dbtype=pgsql
|
dbtype=pgsql
|
||||||
dbport=${DB_PORT:-5432}
|
dbport=${DB_PORT:-5432}
|
||||||
[[ ( -n "${DB_PASS}" ) ]] && file_env 'DB_PASS'
|
[[ ( -n "${DB_PASS}" ) || ( -n "${DB_PASS_FILE}" ) ]] && file_env 'DB_PASS'
|
||||||
;;
|
;;
|
||||||
"redis" | "REDIS" )
|
"redis" | "REDIS" )
|
||||||
dbtype=redis
|
dbtype=redis
|
||||||
dbport=${DB_PORT:-6379}
|
dbport=${DB_PORT:-6379}
|
||||||
[[ ( -n "${DB_PASS}" ) ]] && file_env 'DB_PASS'
|
[[ ( -n "${DB_PASS}" || ( -n "${DB_PASS_FILE}" ) ) ]] && file_env 'DB_PASS'
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -394,6 +394,7 @@ move_backup() {
|
|||||||
print_debug "Backup routines Initialized on $(date)"
|
print_debug "Backup routines Initialized on $(date)"
|
||||||
|
|
||||||
### Wait for Next time to start backup
|
### Wait for Next time to start backup
|
||||||
|
if [ "$1" != "NOW" ]; then
|
||||||
current_time=$(date +"%s")
|
current_time=$(date +"%s")
|
||||||
today=$(date +"%Y%m%d")
|
today=$(date +"%Y%m%d")
|
||||||
|
|
||||||
@@ -409,6 +410,7 @@ print_debug "Backup routines Initialized on $(date)"
|
|||||||
|
|
||||||
print_notice "Next Backup at $(date -d @${target_time} +"%Y-%m-%d %T %Z")"
|
print_notice "Next Backup at $(date -d @${target_time} +"%Y-%m-%d %T %Z")"
|
||||||
sleep $waittime
|
sleep $waittime
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
### Commence Backup
|
### Commence Backup
|
||||||
|
|||||||
Reference in New Issue
Block a user