Compare commits

..

6 Commits

Author SHA1 Message Date
Dave Conroy
4f103a5b36 Release 1.20.0 - See CHANGELOG.md 2020-04-22 14:19:20 -07:00
Dave Conroy
0472cba83d Update README.md 2020-04-22 05:36:48 -07:00
Dave Conroy
fe6fab857f Merge branch 'master' of https://github.com/tiredofit/docker-db-backup 2020-04-22 05:36:08 -07:00
Dave Conroy
6113bf64b2 Update README.md 2020-04-22 05:36:03 -07:00
Dave Conroy
95d1129a12 Merge pull request #22 from pascalberger/patch-1
Fix typo
2020-04-22 05:34:48 -07:00
Pascal Berger
b5466d5b97 Fix typo 2020-03-01 19:43:49 +01:00
3 changed files with 13 additions and 5 deletions

View File

@@ -1,3 +1,9 @@
## 1.20.0 2020-04-22 <dave at tiredofit dot ca>
### Added
- Docker Secrets Support for DB_USER and DB_PASS variables
## 1.19.0 2020-04-22 <dave at tiredofit dot ca>
### Added

View File

@@ -10,7 +10,7 @@
This will build a container for backing up multiple type of DB Servers
Currently backs up CouchDB, InfluxDB, MySQL, MongoDB Postgres, Redis, Rethink servers.
Currently backs up CouchDB, InfluxDB, MySQL, MongoDB, Postgres, Redis, Rethink servers.
* dump to local filesystem
* select database user and password
@@ -108,7 +108,7 @@ Along with the Environment Variables from the [Base image](https://hub.docker.co
## Maintenance
Manual Backups can be perforemd by entering the container and typing `backup-now`
Manual Backups can be performed by entering the container and typing `backup-now`
#### Shell Access
@@ -137,10 +137,10 @@ $ cat post-script.sh
## $7=FILESIZE (Filesize of backup)
## $8=MD5_RESULT (MD5Sum if enabled)
echo "${1} Backup Completed on ${2} for ${3} on ${4} ${5}. Filename: ${5} Size: ${6} MD5: ${7}"
echo "${1} Backup Completed on ${2} for ${3} on ${4} ${5}. Filename: ${6} Size: ${7} bytes MD5: ${8}"
````
Outputs the following on the console:
`mysql Backup Completed on example-db for example on 2020-04-22 05:19:10. Filename: mysql_example_example-db_20200422-051910.sql.bz2 Size: 7795 bytes MD5: 952fbaafa30437494fdf3989a662cd40`
If you wish to change the size value from bytes to megabytes set environment variable `SIZE_VALUE=megabytes`
If you wish to change the size value from bytes to megabytes set environment variable `SIZE_VALUE=megabytes`

View File

@@ -12,6 +12,8 @@ fi
### Sanity Test
sanity_var DB_TYPE "Database Type"
sanity_var DB_HOST "Database Host"
file_env 'DB_USER'
file_env 'DB_PASS'
### Set Defaults
COMPRESSION=${COMPRESSION:-GZ}
@@ -25,9 +27,9 @@ DBPASS=${DB_PASS}
DBUSER=${DB_USER}
DBTYPE=${DB_TYPE}
MD5=${MD5:-TRUE}
SIZE_VALUE=${SIZE_VALUE:-"bytes"}
SPLIT_DB=${SPLIT_DB:-FALSE}
TMPDIR=/tmp/backups
SIZE_VALUE=${SIZE_VALUE:-"bytes"}
if [ "$1" = "NOW" ]; then
DB_DUMP_BEGIN=+0