extract backup with mariabackup

This commit is contained in:
Emmanuel Garette 2019-06-07 14:47:57 +02:00
parent b1bcd05792
commit 44629b4587

View File

@ -12,16 +12,6 @@ OPTION="--lock-tables"
rm -f $MYSQLSAVDIR/*.sql || true
mkdir -p $MYSQLSAVDIR
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
mariabackup --defaults-file=/etc/mysql/debian.cnf --backup --target-dir=$MYSQLSAVDIR
exit 0