sauvegarde_mysql.sh: fix + ajout routines & events au dump
This commit is contained in:
parent
5caf403901
commit
160c938744
1 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@
|
||||||
# Files will be named BASE_DIR/PREFIXEbasenameSUFFIXE
|
# Files will be named BASE_DIR/PREFIXEbasenameSUFFIXE
|
||||||
BASE_DIR="/var/backups/bdd"
|
BASE_DIR="/var/backups/bdd"
|
||||||
MYSQL_EXTRA_ARGS=""
|
MYSQL_EXTRA_ARGS=""
|
||||||
MYSQLDUMP_EXTRA_ARGS="--add-drop-table"
|
MYSQLDUMP_EXTRA_ARGS="--add-drop-table --routines --events"
|
||||||
PREFIXE="sauv_mysql_"
|
PREFIXE="sauv_mysql_"
|
||||||
SUFFIXE=_$( date +%Y%m%d-%H%M%S ).sql.gz
|
SUFFIXE=_$( date +%Y%m%d-%H%M%S ).sql.gz
|
||||||
NB_DAYS_BEFORE_DELETION="30"
|
NB_DAYS_BEFORE_DELETION="30"
|
||||||
|
@ -121,7 +121,7 @@ printf "%s\n" "$BASES" | while read BASENAME; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
unset IFS
|
unset IFS
|
||||||
mysqldump $MYSQL_EXTRA_ARGS "$BASENAME" | gzip -c > "$BASE_DIR/$PREFIXE$BASENAME$SUFFIXE"
|
mysqldump $MYSQLDUMP_EXTRA_ARGS "$BASENAME" | gzip -c > "$BASE_DIR/$PREFIXE$BASENAME$SUFFIXE"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue