Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion automysqlbackup
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ load_default_config() {
CONFIG_mysql_dump_socket=''
CONFIG_mysql_dump_create_database='no'
CONFIG_mysql_dump_add_drop_database='no'
CONFIG_mysql_dump_create_event='yes'
CONFIG_mysql_dump_use_separate_dirs='yes'
CONFIG_mysql_dump_compression='gzip'
CONFIG_mysql_dump_commcomp='no'
Expand Down Expand Up @@ -492,7 +493,7 @@ backup_local_files () {
# @deps: load_default_config
parse_configuration () {
# OPT string for use with mysqldump ( see man mysqldump )
opt=( '--quote-names' '--opt' '--events' )
opt=( '--quote-names' '--opt' )

# OPT string for use with mysql (see man mysql )
mysql_opt=()
Expand Down Expand Up @@ -560,6 +561,10 @@ parse_configuration () {
opt=( "${opt[@]}" '--add-drop-database' )
fi

if [[ "${CONFIG_mysql_dump_create_event}" = "yes" ]]; then
opt=( "${opt[@]}" '--events' )
fi

# if differential backup is active and the specified rotation is smaller than 21 days, set it to 21 days to ensure, that
# master backups aren't deleted.
if [[ "x$CONFIG_mysql_dump_differential" = "xyes" ]] && (( ${CONFIG_rotation_daily} < 21 )); then
Expand Down
3 changes: 3 additions & 0 deletions automysqlbackup.conf
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ CONFIG_db_exclude_pattern=()

# Backup dump settings

# Include CREATE EVENT in backup?
#CONFIG_mysql_dump_create_event='yes'

# Include CREATE DATABASE in backup?
#CONFIG_mysql_dump_create_database='no'

Expand Down