Update mysql_backup.sh
This commit is contained in:
@@ -14,7 +14,7 @@ usage()
|
|||||||
echo "-e | --email :: notification email"
|
echo "-e | --email :: notification email"
|
||||||
echo "-l | --lock-all-tables"
|
echo "-l | --lock-all-tables"
|
||||||
echo "-s | --single-transaction"
|
echo "-s | --single-transaction"
|
||||||
echo "-i| --ignore-table"
|
echo "-i | --ignore-table"
|
||||||
echo "-z | --gzip :: compress dump using gzip"
|
echo "-z | --gzip :: compress dump using gzip"
|
||||||
echo "-x | --xz :: compress dump using xz"
|
echo "-x | --xz :: compress dump using xz"
|
||||||
echo "--xz-threads :: number of worker threads to use by xz. 0 - use all CPU. (default: 2)"
|
echo "--xz-threads :: number of worker threads to use by xz. 0 - use all CPU. (default: 2)"
|
||||||
@@ -56,6 +56,9 @@ mysqlparams=" --all-databases \
|
|||||||
--comments \
|
--comments \
|
||||||
--quick \
|
--quick \
|
||||||
--force \
|
--force \
|
||||||
|
--order-by-primary \
|
||||||
|
--apply-replica-statements \
|
||||||
|
--dump-date \
|
||||||
--ignore-table=mysql.slow_log \
|
--ignore-table=mysql.slow_log \
|
||||||
--log-error=/tmp/mysqldump.log" ;
|
--log-error=/tmp/mysqldump.log" ;
|
||||||
|
|
||||||
@@ -87,7 +90,7 @@ while [ "${1}" != "" ]; do
|
|||||||
--xz-threads ) shift
|
--xz-threads ) shift
|
||||||
xzthreads=${1}
|
xzthreads=${1}
|
||||||
;;
|
;;
|
||||||
-m | --master ) mysqlparams="${mysqlparams} --master-data --include-master-host-port --apply-slave-statements" ;
|
-m | --master ) mysqlparams="${mysqlparams} --source-data --dump-replica" ;
|
||||||
;;
|
;;
|
||||||
-q | --quiet ) quiet=1
|
-q | --quiet ) quiet=1
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user