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 @@ -83,6 +83,7 @@ load_default_config() {
8383 CONFIG_mysql_dump_socket=' '
8484 CONFIG_mysql_dump_create_database=' no'
8585 CONFIG_mysql_dump_add_drop_database=' no'
86+ CONFIG_mysql_dump_create_event=' yes'
8687 CONFIG_mysql_dump_use_separate_dirs=' yes'
8788 CONFIG_mysql_dump_compression=' gzip'
8889 CONFIG_mysql_dump_commcomp=' no'
@@ -492,7 +493,7 @@ backup_local_files () {
492493# @deps: load_default_config
493494parse_configuration () {
494495 # OPT string for use with mysqldump ( see man mysqldump )
495- opt=( ' --quote-names' ' --opt' ' --events ' )
496+ opt=( ' --quote-names' ' --opt' )
496497
497498 # OPT string for use with mysql (see man mysql )
498499 mysql_opt=()
@@ -560,6 +561,10 @@ parse_configuration () {
560561 opt=( " ${opt[@]} " ' --add-drop-database' )
561562 fi
562563
564+ if [[ " ${CONFIG_mysql_dump_create_event} " = " yes" ]]; then
565+ opt=( " ${opt[@]} " ' --events' )
566+ fi
567+
563568 # if differential backup is active and the specified rotation is smaller than 21 days, set it to 21 days to ensure, that
564569 # master backups aren't deleted.
565570 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