diff --git a/dev/n_obackup.sh b/dev/n_obackup.sh index b8fad85..84209df 100755 --- a/dev/n_obackup.sh +++ b/dev/n_obackup.sh @@ -800,9 +800,9 @@ function BackupDatabase { # Hack to prevent warning on table mysql.events, some mysql versions don't support --skip-events, prefer using --ignore-table if [ "$database" == "mysql" ]; then - mysql_options='--skip-lock-tables --single-transaction --ignore-table=mysql.event' + mysql_options="$MYSQLDUMP_OPTIONS --ignore-table=mysql.event" else - mysql_options='--skip-lock-tables --single-transaction' + mysql_options="$MYSQLDUMP_OPTIONS" fi if [ "$BACKUP_TYPE" == "local" ]; then diff --git a/host_backup.conf.example b/host_backup.conf.example index c966a42..ec586f5 100644 --- a/host_backup.conf.example +++ b/host_backup.conf.example @@ -2,7 +2,7 @@ ###### obackup - Local or Remote, push or pull backup script for files & mysql databases ###### (C) 2013-2016 by Orsiris de Jong (www.netpower.fr) -###### obackup v2.1x config file rev 2016083001 +###### obackup v2.1x config file rev 2016083101 ###### GENERAL BACKUP OPTIONS @@ -96,6 +96,10 @@ DATABASES_ALL_EXCLUDE_LIST="test;mysql" SOFT_MAX_EXEC_TIME_DB_TASK=3600 HARD_MAX_EXEC_TIME_DB_TASK=7200 +## mysqldump options (ex: --extended-insert, --single-transaction, --quick...). See MySQL / MariaDB manual +## default option: --opt +MYSQLDUMP_OPTIONS="--opt --single-transaction" + ## Preferred SQL dump compression. Compression methods can be xz, lzma, pigz or gzip (will fallback from xz to gzip depending if available) ## Generally, level 5 is a good compromise between cpu, memory hunger and compress ratio. Gzipped files are set to be rsyncable. COMPRESSION_LEVEL=3