From 01259ad912a83e3331c836a68f91ee1c93b6bd62 Mon Sep 17 00:00:00 2001 From: Chl Date: Fri, 19 Apr 2024 20:48:49 +0200 Subject: [PATCH] mysqldump: new options --- sauvegarde_mysql.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sauvegarde_mysql.sh b/sauvegarde_mysql.sh index c017103..2344dc5 100755 --- a/sauvegarde_mysql.sh +++ b/sauvegarde_mysql.sh @@ -4,7 +4,10 @@ # Files will be named BASE_DIR/PREFIXEbasenameSUFFIXE BASE_DIR="/var/backups/bdd" 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_" SUFFIXE=_$( date +%Y%m%d-%H%M%S ).sql.gz NB_DAYS_BEFORE_DELETION="30"