Merge branch '2.7.0/master' into dist/eole/2.7.0/master
This commit is contained in:
commit
33a7cf66c6
|
@ -9,19 +9,11 @@ DESC="Exportation des bases MariaDB"
|
|||
MYSQLSAVDIR=$SAVDIR/sql
|
||||
OPTION="--lock-tables"
|
||||
|
||||
rm -f $MYSQLSAVDIR/*.sql || true
|
||||
mkdir -p $MYSQLSAVDIR
|
||||
if [[ -d ${MYSQLSAVDIR} ]]
|
||||
then
|
||||
rm -rf ${MYSQLSAVDIR}
|
||||
mkdir -p ${MYSQLSAVDIR}
|
||||
fi
|
||||
|
||||
DATABASES=$(mysql --defaults-file=/etc/mysql/debian.cnf -e 'show databases' | grep -v '^Database$')
|
||||
for databasename in $DATABASES; do
|
||||
case "$databasename" in
|
||||
information_schema|performance_schema|bareos)
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
mysqldump --defaults-file=/etc/mysql/debian.cnf --databases $databasename --flush-privileges --create-options -Q -c $OPTION > $MYSQLSAVDIR/$databasename.sql
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
exit 0
|
||||
mariabackup --defaults-file=/etc/mysql/debian.cnf --backup --target-dir=$MYSQLSAVDIR
|
||||
exit $?
|
||||
|
|
Loading…
Reference in New Issue