File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ load_default_config() {
8484 CONFIG_mysql_dump_socket=' '
8585 CONFIG_mysql_dump_create_database=' no'
8686 CONFIG_mysql_dump_add_drop_database=' no'
87+ CONFIG_mysql_dump_create_event=' yes'
8788 CONFIG_mysql_dump_use_separate_dirs=' yes'
8889 CONFIG_mysql_dump_compression=' gzip'
8990 CONFIG_mysql_dump_commcomp=' no'
@@ -516,7 +517,7 @@ backup_local_files () {
516517# @deps: load_default_config
517518parse_configuration () {
518519 # OPT string for use with mysqldump ( see man mysqldump )
519- opt=( ' --quote-names' ' --opt' ' --events ' )
520+ opt=( ' --quote-names' ' --opt' )
520521
521522 # OPT string for use with mysql (see man mysql )
522523 mysql_opt=()
@@ -584,6 +585,10 @@ parse_configuration () {
584585 opt=( " ${opt[@]} " ' --add-drop-database' )
585586 fi
586587
588+ if [[ " ${CONFIG_mysql_dump_create_event} " = " yes" ]]; then
589+ opt=( " ${opt[@]} " ' --events' )
590+ fi
591+
587592 # if differential backup is active and the specified rotation is smaller than 21 days, set it to 21 days to ensure, that
588593 # master backups aren't deleted.
589594 if [[ " x$CONFIG_mysql_dump_differential " = " xyes" ]] && (( ${CONFIG_rotation_daily} < 21 )) ; then
Original file line number Diff line number Diff line change @@ -192,6 +192,9 @@ CONFIG_db_exclude_pattern=()
192192
193193# Backup dump settings
194194
195+ # Include CREATE EVENT in backup?
196+ #CONFIG_mysql_dump_create_event='yes'
197+
195198# Include CREATE DATABASE in backup?
196199#CONFIG_mysql_dump_create_database='no'
197200
You can’t perform that action at this time.
0 commit comments