1.8 Added DBS_SKIP to prevent dumping certain databases
1.8 Added DBS_SKIP to prevent dumping certain databases
This commit is contained in:
parent
f9d1b0e9a9
commit
94ce812453
|
@ -29,6 +29,7 @@
|
|||
# #
|
||||
##############################################################################################
|
||||
# #
|
||||
# 2020/12/30 1.8 Added DBS_SKIP to prevent dumping certain databases #
|
||||
# 2020/02/27 1.7 Added username and password and set default retention to 1 day #
|
||||
# 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 #
|
||||
|
@ -109,7 +110,8 @@ if [[ -n ${MYSQL_PW} && "${MYSQL_PW}" != "" ]]; then
|
|||
MYSQL_OPTS="${MYSQL_OPTS} -p${MYSQL_PW}"
|
||||
fi
|
||||
# Get list of Databases except the pid file
|
||||
DBS_LIST=$(mysql ${MYSQL_OPTS} -s -N -e "show databases;")
|
||||
DBS_SKIP="'mysql','performance_schema','sys','information_schema'"
|
||||
DBS_LIST=$(mysql ${MYSQL_OPTS} -s -N -e "SELECT schema_name FROM information_schema.schemata WHERE schema_name NOT IN (${DBS_SKIP});")
|
||||
|
||||
index=0
|
||||
# Check if we can connect to the mysql server; otherwise die
|
||||
|
|
Loading…
Reference in New Issue