diff --git a/CHANGELOG.md b/CHANGELOG.md index 9247574..e4c855d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.18.1 2020-03-14 + + ### Changed + - Allow for passwords with spaces in them for MariaDB / MySQL + + ## 1.18.0 2019-12-29 ### Added diff --git a/install/etc/s6/services/10-db-backup/run b/install/etc/s6/services/10-db-backup/run index 1cf9545..4a4c6d9 100755 --- a/install/etc/s6/services/10-db-backup/run +++ b/install/etc/s6/services/10-db-backup/run @@ -65,7 +65,7 @@ fi "mysql" | "MYSQL" | "mariadb" | "MARIADB") DBTYPE=mysql 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" ) DBTYPE=pgsql @@ -96,7 +96,7 @@ function backup_couch() { function backup_mysql() { 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 if [[ "$db" != "information_schema" ]] && [[ "$db" != _* ]] ; then