diff --git a/automysqlbackup b/automysqlbackup index 4968bf9..e42f5b9 100755 --- a/automysqlbackup +++ b/automysqlbackup @@ -96,6 +96,7 @@ load_default_config() { CONFIG_mysql_dump_master_data= CONFIG_mysql_dump_full_schema='yes' CONFIG_mysql_dump_dbstatus='yes' + CONFIG_mysql_dump_tablespaces='yes' CONFIG_mysql_dump_differential='no' CONFIG_mysql_dump_login_path='automysqldump' CONFIG_mysql_dump_login_path_file='' @@ -594,6 +595,10 @@ parse_configuration () { opt=( "${opt[@]}" '--events' ) fi + if [[ "${CONFIG_mysql_dump_tablespaces}" = "no" ]]; then + opt=( "${opt[@]}" '--no-tablespaces' ) + 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 diff --git a/automysqlbackup.conf b/automysqlbackup.conf index 91a62fb..b278811 100644 --- a/automysqlbackup.conf +++ b/automysqlbackup.conf @@ -190,6 +190,11 @@ CONFIG_db_exclude_pattern=() # in the meantime. #CONFIG_mysql_dump_dbstatus='yes' +# Include tablespace information in backup? +# As a breaking change in MySQL 5.7.31 and 8.0.21, mysqldump requires either +# PROCESS privileges or must be invoked with the --no-tablespaces option. +#CONFIG_mysql_dump_tablespaces='yes' + # Backup dump settings # Include CREATE EVENT in backup?