From d87c9ee307cf6e8d45bfd60988ca0a9951085731 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Thu, 18 Apr 2019 14:52:17 +0200 Subject: [PATCH 1/3] ajout des extras dans le paquet --- {schedule_config => schedule/config}/config.sh | 0 {schedule_extra => schedule/extra}/01_mariadb.xml | 0 {schedule_scripts => schedule/scripts}/mariadb | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename {schedule_config => schedule/config}/config.sh (100%) rename {schedule_extra => schedule/extra}/01_mariadb.xml (100%) rename {schedule_scripts => schedule/scripts}/mariadb (100%) diff --git a/schedule_config/config.sh b/schedule/config/config.sh similarity index 100% rename from schedule_config/config.sh rename to schedule/config/config.sh diff --git a/schedule_extra/01_mariadb.xml b/schedule/extra/01_mariadb.xml similarity index 100% rename from schedule_extra/01_mariadb.xml rename to schedule/extra/01_mariadb.xml diff --git a/schedule_scripts/mariadb b/schedule/scripts/mariadb similarity index 100% rename from schedule_scripts/mariadb rename to schedule/scripts/mariadb From a199b9182d5863668f02858f7febc4a68cb6c5c9 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Thu, 18 Apr 2019 14:58:05 +0200 Subject: [PATCH 2/3] sauvegarde plutot dans /home/backup --- schedule/config/config.sh | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 schedule/config/config.sh diff --git a/schedule/config/config.sh b/schedule/config/config.sh deleted file mode 100644 index 2562ef3..0000000 --- a/schedule/config/config.sh +++ /dev/null @@ -1,7 +0,0 @@ -# Configuration commune aux scripts schedule -# Configuration de base modifiée pour copier dans le partage nfs plutôt que /home - -SAVDIR=/mnt/sauvegardes/ -# pour que l'affichage de [ ok ] soit ok -export TERM='dumb' -umask 0077 From d19bfdebf9eeb5466441eb85c405fc157301bb89 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Thu, 18 Apr 2019 17:00:07 +0200 Subject: [PATCH 3/3] fait fonctionner la sauvegarde mariadb --- schedule/scripts/mariadb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/schedule/scripts/mariadb b/schedule/scripts/mariadb index 0dda3ea..161103a 100644 --- a/schedule/scripts/mariadb +++ b/schedule/scripts/mariadb @@ -9,19 +9,19 @@ DESC="Exportation des bases MariaDB" MYSQLSAVDIR=$SAVDIR/sql OPTION="--lock-tables" -rm -f $MYSQLSAVDIR/*.sql +rm -f $MYSQLSAVDIR/*.sql || true mkdir -p $MYSQLSAVDIR -CMD="mysql --defaults-file=/etc/mysql/mariadbBackup.cnf -e 'show databases' | grep -v '^Database$'" -DATABASES=$(CreoleRun "$CMD" mysql) +DATABASES=$(mysql --defaults-file=/etc/mysql/mariadbBackup.cnf -e 'show databases' | grep -v '^Database$') for databasename in $DATABASES; do case "$databasename" in information_schema|performance_schema|bareos) continue ;; *) - 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 + mysqldump --defaults-file=/etc/mysql/mariadbBackup.cnf --databases $databasename --flush-privileges --create-options -Q -c $OPTION 2>/dev/null > $MYSQLSAVDIR/$databasename.sql ;; esac done + +exit 0