1
0
Fork 0

mysqldump: new options

This commit is contained in:
Chl 2024-04-19 20:48:49 +02:00
parent 57fbb41825
commit 01259ad912

View file

@ -4,7 +4,10 @@
# 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 --routines --events" # Pas d'option --skip-definer ?
# - sed 's/^CREATE DEFINER=`[^ ]\+` /CREATE /' # ne marche que pour CREATE FUNCTION et similaire
# - sed 's/ DEFINER=`[^ ]\+` / DEFINER=CURRENT_USER /' # marche aussi pour les commentaires.
MYSQLDUMP_EXTRA_ARGS="--add-drop-table --routines --events --triggers --single-transaction"
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"