1
0
mirror of https://github.com/deajan/obackup.git synced 2024-11-12 19:03:42 +01:00

Added more mysqldump flexibility

This commit is contained in:
deajan 2016-08-31 11:15:12 +02:00
parent fbdd12dc72
commit 0127da6ac3
2 changed files with 7 additions and 3 deletions

View File

@ -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

View File

@ -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