Fixed backups of databases with dash (-) in name
This commit is contained in:
parent
b618c5f7ef
commit
b25e453e22
|
@ -29,6 +29,7 @@
|
||||||
# #
|
# #
|
||||||
##############################################################################################
|
##############################################################################################
|
||||||
# #
|
# #
|
||||||
|
# 2019/01/28 1.6 Fixed backups of databases with dash (-) in name #
|
||||||
# 2019/01/21 1.5 Fixed creation of databases with dot (.) in name #
|
# 2019/01/21 1.5 Fixed creation of databases with dot (.) in name #
|
||||||
# 2018/02/11 1.4 Fixed detection of mydumper #
|
# 2018/02/11 1.4 Fixed detection of mydumper #
|
||||||
# 2017/11/09 1.3 Fixed multiple backups on a day support #
|
# 2017/11/09 1.3 Fixed multiple backups on a day support #
|
||||||
|
@ -119,7 +120,7 @@ else
|
||||||
mysqldump -R -d --single-transaction ${DB} | gzip -c > ${DB_BKP_FLDR}/000-DB_SCHEMA.sql.gz
|
mysqldump -R -d --single-transaction ${DB} | gzip -c > ${DB_BKP_FLDR}/000-DB_SCHEMA.sql.gz
|
||||||
index=0
|
index=0
|
||||||
#Get the tables and its type. Store it in an array.
|
#Get the tables and its type. Store it in an array.
|
||||||
table_types=($(mysql -e "show table status from ${DB}" | awk '{ if ($2 == "MyISAM" || $2 == "InnoDB") print $1,$2}'))
|
table_types=($(mysql -e "show table status from \`${DB}\`" | awk '{ if ($2 == "MyISAM" || $2 == "InnoDB") print $1,$2}'))
|
||||||
table_type_count=${#table_types[@]}
|
table_type_count=${#table_types[@]}
|
||||||
# Loop through the tables and apply the mysqldump option according to the table type
|
# Loop through the tables and apply the mysqldump option according to the table type
|
||||||
# The table specific SQL files will not contain any create info for the table schema.
|
# The table specific SQL files will not contain any create info for the table schema.
|
||||||
|
|
Loading…
Reference in New Issue