Fix schedule backup script
This commit is contained in:
parent
d0284ccbe4
commit
03ce27c7f2
|
@ -9,9 +9,11 @@ DESC="Exportation des bases MariaDB"
|
||||||
MYSQLSAVDIR=$SAVDIR/sql
|
MYSQLSAVDIR=$SAVDIR/sql
|
||||||
OPTION="--lock-tables"
|
OPTION="--lock-tables"
|
||||||
|
|
||||||
rm -f $MYSQLSAVDIR/*.sql || true
|
if [[ -d ${MYSQLSAVDIR} ]]
|
||||||
mkdir -p $MYSQLSAVDIR
|
then
|
||||||
|
rm -rf ${MYSQLSAVDIR}
|
||||||
|
mkdir -p ${MYSQLSAVDIR}
|
||||||
|
fi
|
||||||
|
|
||||||
mariabackup --defaults-file=/etc/mysql/debian.cnf --backup --target-dir=$MYSQLSAVDIR
|
mariabackup --defaults-file=/etc/mysql/debian.cnf --backup --target-dir=$MYSQLSAVDIR
|
||||||
|
exit $?
|
||||||
exit 0
|
|
||||||
|
|
Loading…
Reference in New Issue