File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
install/etc/s6/services/10-db-backup Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1+ ## 1.18.1 2020-03-14 <dave at tiredofit dot ca >
2+
3+ ### Changed
4+ - Allow for passwords with spaces in them for MariaDB / MySQL
5+
6+
17## 1.18.0 2019-12-29 <dave at tiredofit dot ca >
28
39 ### Added
Original file line number Diff line number Diff line change 6565 "mysql" | "MYSQL" | "mariadb" | "MARIADB")
6666 DBTYPE=mysql
6767 DBPORT=${DB_PORT:-3306}
68- [[ ( -n "${DB_PASS}" ) ]] && MYSQL_PASS_STR=" -p${DBPASS}"
68+ [[ ( -n "${DB_PASS}" ) ]] && MYSQL_PASS_STR=" -p' ${DBPASS}' "
6969 ;;
7070 "postgres" | "postgresql" | "pgsql" | "POSTGRES" | "POSTGRESQL" | "PGSQL" )
7171 DBTYPE=pgsql
@@ -96,7 +96,7 @@ function backup_couch() {
9696
9797function backup_mysql() {
9898 if [ "$SPLIT_DB" = "TRUE" ] || [ "$SPLIT_DB" = "true" ]; then
99- DATABASES=`mysql -h $DBHOST -P $DBPORT -u$DBUSER -p$ DBPASS --batch -e "SHOW DATABASES;" | grep -v Database|grep -v schema`
99+ DATABASES=`mysql -h ${ DBHOST} -P $DBPORT -u$DBUSER -p"${ DBPASS}" --batch -e "SHOW DATABASES;" | grep -v Database|grep -v schema`
100100
101101 for db in $DATABASES; do
102102 if [[ "$db" != "information_schema" ]] && [[ "$db" != _* ]] ; then
You can’t perform that action at this time.
0 commit comments