retour au sauvegarde Bareos pour incompatibilité Xtrabackup, personnalisation des sauvegardes pour MaraiDB

This commit is contained in:
vincent 2019-02-15 11:04:05 +01:00
parent 4dd7e78f7c
commit d84efbfaa4
2 changed files with 6 additions and 6 deletions

View File

@ -2,14 +2,14 @@
<creole> <creole>
<variables> <variables>
<family name="mysql" description="Exportation des bases de données MySQL"> <family name="mariadb" description="Exportation des bases de données MariaDB">
<variable name="description" type="string" hidden="True"><value>Exportation des bases MySQL</value></variable> <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="day" type="schedule" description="Périodicité d'exécution"><value>daily</value></variable>
<variable name="mode" type="schedulemod" hidden="True"><value>pre</value></variable> <variable name="mode" type="schedulemod" hidden="True"><value>pre</value></variable>
</family> </family>
</variables> </variables>
<constraints> <constraints>
<fill name='calc_multi_condition' target='schedule.mysql.day'> <fill name='calc_multi_condition' target='schedule.mariadb.day'>
<param>non</param> <param>non</param>
<param type='eole' name='condition_1'>dbEnableBackup</param> <param type='eole' name='condition_1'>dbEnableBackup</param>
<param name='match'>none</param> <param name='match'>none</param>

View File

@ -2,7 +2,7 @@
set -e set -e
DESC="Exportation des bases MySQL" DESC="Exportation des bases MariaDB"
. /usr/share/eole/schedule/config.sh . /usr/share/eole/schedule/config.sh
@ -12,7 +12,7 @@ OPTION="--lock-tables"
rm -f $MYSQLSAVDIR/*.sql rm -f $MYSQLSAVDIR/*.sql
mkdir -p $MYSQLSAVDIR 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) DATABASES=$(CreoleRun "$CMD" mysql)
for databasename in $DATABASES; do for databasename in $DATABASES; do
case "$databasename" in case "$databasename" in
@ -20,7 +20,7 @@ for databasename in $DATABASES; do
continue 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 CreoleRun "$CMD" mysql > $MYSQLSAVDIR/$databasename.sql
;; ;;
esac esac