retour au sauvegarde Bareos pour incompatibilité Xtrabackup, personnalisation des sauvegardes pour MaraiDB
This commit is contained in:
parent
4dd7e78f7c
commit
d84efbfaa4
|
@ -2,14 +2,14 @@
|
|||
|
||||
<creole>
|
||||
<variables>
|
||||
<family name="mysql" description="Exportation des bases de données MySQL">
|
||||
<variable name="description" type="string" hidden="True"><value>Exportation des bases MySQL</value></variable>
|
||||
<family name="mariadb" description="Exportation des bases de données MariaDB">
|
||||
<variable name="description" type="string" hidden="True"><value>Exportation des bases MariaDB</value></variable>
|
||||
<variable name="day" type="schedule" description="Périodicité d'exécution"><value>daily</value></variable>
|
||||
<variable name="mode" type="schedulemod" hidden="True"><value>pre</value></variable>
|
||||
</family>
|
||||
</variables>
|
||||
<constraints>
|
||||
<fill name='calc_multi_condition' target='schedule.mysql.day'>
|
||||
<fill name='calc_multi_condition' target='schedule.mariadb.day'>
|
||||
<param>non</param>
|
||||
<param type='eole' name='condition_1'>dbEnableBackup</param>
|
||||
<param name='match'>none</param>
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
set -e
|
||||
|
||||
DESC="Exportation des bases MySQL"
|
||||
DESC="Exportation des bases MariaDB"
|
||||
|
||||
. /usr/share/eole/schedule/config.sh
|
||||
|
||||
|
@ -12,7 +12,7 @@ OPTION="--lock-tables"
|
|||
rm -f $MYSQLSAVDIR/*.sql
|
||||
mkdir -p $MYSQLSAVDIR
|
||||
|
||||
CMD="mysql --defaults-file=/etc/mysql/mariadb.cnf -e 'show databases' | grep -v '^Database$'"
|
||||
CMD="mysql --defaults-file=/etc/mysql/mariadbBackup.cnf -e 'show databases' | grep -v '^Database$'"
|
||||
DATABASES=$(CreoleRun "$CMD" mysql)
|
||||
for databasename in $DATABASES; do
|
||||
case "$databasename" in
|
||||
|
@ -20,7 +20,7 @@ for databasename in $DATABASES; do
|
|||
continue
|
||||
;;
|
||||
*)
|
||||
CMD="mysqldump --defaults-file=/etc/mysql/mariadb.cnf --databases $databasename --flush-privileges --create-options -Q -c $OPTION 2>/dev/null"
|
||||
CMD="mysqldump --defaults-file=/etc/mysql/mariadbBackup.cnf --databases $databasename --flush-privileges --create-options -Q -c $OPTION 2>/dev/null"
|
||||
CreoleRun "$CMD" mysql > $MYSQLSAVDIR/$databasename.sql
|
||||
;;
|
||||
esac
|
Loading…
Reference in New Issue