Added sys DB to the exception

This commit is contained in:
root 2023-12-26 22:45:22 +02:00
parent 7b7a9cb4ae
commit 4a117f39c7

View File

@ -25,7 +25,7 @@ fi
databases=$(mysql ${HOST_OPTIONS} -u ${USER} ${PASSWORD_OPTIONS} --batch -s -r -e 'show databases')
for db in ${databases}; do
if [[ "${db}" != "information_schema" ]] && [[ "${db}" != "performance_schema" ]] && [[ "${db}" != "mysql" ]] && [[ "${db}" != _* ]]
if [[ "${db}" != "information_schema" ]] && [[ "${db}" != "performance_schema" ]] && [[ "${db}" != "mysql" ]] && [[ "${db}" != _* ]] && [[ "${db}" != "sys" ]]
then
DUMP_DIR="${OUTPUT_DIR}/${db}"
DUMP_FILENAME="${DUMP_DIR}/$(date +%Y%m%d_%H:%M:%S).${db}.sql"