mirror of
https://github.com/tiredofit/docker-db-backup.git
synced 2025-12-22 21:53:42 +01:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6009e7a1e |
@@ -1,3 +1,9 @@
|
|||||||
|
## 1.18.1 2020-03-14 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Allow for passwords with spaces in them for MariaDB / MySQL
|
||||||
|
|
||||||
|
|
||||||
## 1.18.0 2019-12-29 <dave at tiredofit dot ca>
|
## 1.18.0 2019-12-29 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ fi
|
|||||||
"mysql" | "MYSQL" | "mariadb" | "MARIADB")
|
"mysql" | "MYSQL" | "mariadb" | "MARIADB")
|
||||||
DBTYPE=mysql
|
DBTYPE=mysql
|
||||||
DBPORT=${DB_PORT:-3306}
|
DBPORT=${DB_PORT:-3306}
|
||||||
[[ ( -n "${DB_PASS}" ) ]] && MYSQL_PASS_STR=" -p${DBPASS}"
|
[[ ( -n "${DB_PASS}" ) ]] && MYSQL_PASS_STR=" -p'${DBPASS}'"
|
||||||
;;
|
;;
|
||||||
"postgres" | "postgresql" | "pgsql" | "POSTGRES" | "POSTGRESQL" | "PGSQL" )
|
"postgres" | "postgresql" | "pgsql" | "POSTGRES" | "POSTGRESQL" | "PGSQL" )
|
||||||
DBTYPE=pgsql
|
DBTYPE=pgsql
|
||||||
@@ -96,7 +96,7 @@ function backup_couch() {
|
|||||||
|
|
||||||
function backup_mysql() {
|
function backup_mysql() {
|
||||||
if [ "$SPLIT_DB" = "TRUE" ] || [ "$SPLIT_DB" = "true" ]; then
|
if [ "$SPLIT_DB" = "TRUE" ] || [ "$SPLIT_DB" = "true" ]; then
|
||||||
DATABASES=`mysql -h $DBHOST -P $DBPORT -u$DBUSER -p$DBPASS --batch -e "SHOW DATABASES;" | grep -v Database|grep -v schema`
|
DATABASES=`mysql -h ${DBHOST} -P $DBPORT -u$DBUSER -p"${DBPASS}" --batch -e "SHOW DATABASES;" | grep -v Database|grep -v schema`
|
||||||
|
|
||||||
for db in $DATABASES; do
|
for db in $DATABASES; do
|
||||||
if [[ "$db" != "information_schema" ]] && [[ "$db" != _* ]] ; then
|
if [[ "$db" != "information_schema" ]] && [[ "$db" != _* ]] ; then
|
||||||
|
|||||||
Reference in New Issue
Block a user