mariadbBackup.cnf > debian.cnf
This commit is contained in:
parent
d19bfdebf9
commit
efc3f5848c
|
@ -12,14 +12,14 @@ OPTION="--lock-tables"
|
||||||
rm -f $MYSQLSAVDIR/*.sql || true
|
rm -f $MYSQLSAVDIR/*.sql || true
|
||||||
mkdir -p $MYSQLSAVDIR
|
mkdir -p $MYSQLSAVDIR
|
||||||
|
|
||||||
DATABASES=$(mysql --defaults-file=/etc/mysql/mariadbBackup.cnf -e 'show databases' | grep -v '^Database$')
|
DATABASES=$(mysql --defaults-file=/etc/mysql/debian.cnf -e 'show databases' | grep -v '^Database$')
|
||||||
for databasename in $DATABASES; do
|
for databasename in $DATABASES; do
|
||||||
case "$databasename" in
|
case "$databasename" in
|
||||||
information_schema|performance_schema|bareos)
|
information_schema|performance_schema|bareos)
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
mysqldump --defaults-file=/etc/mysql/mariadbBackup.cnf --databases $databasename --flush-privileges --create-options -Q -c $OPTION 2>/dev/null > $MYSQLSAVDIR/$databasename.sql
|
mysqldump --defaults-file=/etc/mysql/debian.cnf --databases $databasename --flush-privileges --create-options -Q -c $OPTION 2>/dev/null > $MYSQLSAVDIR/$databasename.sql
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue