Compare commits
2 Commits
aec567045d
...
cf632ec6e6
Author | SHA1 | Date |
---|---|---|
vincent | cf632ec6e6 | |
Emmanuel Garette | 44629b4587 |
|
@ -12,16 +12,6 @@ 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/debian.cnf -e 'show databases' | grep -v '^Database$')
|
mariabackup --defaults-file=/etc/mysql/debian.cnf --backup --target-dir=$MYSQLSAVDIR
|
||||||
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
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue