溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

mydumper和myloader參數(shù)使用說明

發(fā)布時間:2020-08-08 23:25:55 來源:ITPUB博客 閱讀:261 作者:chenfeng 欄目:MySQL數(shù)據(jù)庫
mydumper
Usage:
  mydumper [OPTION...] multi-threaded MySQL dumping


Help Options:
  -?, --help                  Show help options


Application Options:
  -B, --database              需要備份的數(shù)據(jù)庫,一個數(shù)據(jù)庫一條命令備份,要不就是備份所有數(shù)據(jù)庫,包括mysql。
  -T, --tables-list           需要備份的表,用逗號分隔。
  -o, --outputdir             備份文件目錄
  -s, --statement-size        生成插入語句的字節(jié)數(shù),默認1000000,這個參數(shù)不能太小,不然會報 Row bigger than statement_size for tools.t_serverinfo
  -r, --rows                  試圖用行塊來分割表,該參數(shù)關(guān)閉--chunk-filesize
  -F, --chunk-filesize        行塊分割表的文件大小,單位是MB
  -c, --compress              壓縮輸出文件
  -e, --build-empty-files     即使表沒有數(shù)據(jù),也產(chǎn)生一個空文件
  -x, --regex                 正則表達式匹配,如'db.table'
  -i, --ignore-engines        忽略的存儲引擎,用逗號分隔 
  -m, --no-schemas            不導(dǎo)出表結(jié)構(gòu)
  -d, --no-data               不導(dǎo)出表數(shù)據(jù)
  -G, --triggers              導(dǎo)出觸發(fā)器
  -E, --events                導(dǎo)出事件
  -R, --routines              導(dǎo)出存儲過程
  -k, --no-locks              不執(zhí)行共享讀鎖 警告:這將導(dǎo)致不一致的備份
  --less-locking              減到最小的鎖在innodb表上.
  -l, --long-query-guard      設(shè)置長查詢時間,默認60秒,超過該時間則會報錯:There are queries in PROCESSLIST running longer than 60s, aborting dump
  -K, --kill-long-queries kill掉長時間執(zhí)行的查詢,備份報錯:Lock wait timeout exceeded; try restarting transaction


  -D, --daemon                啟用守護進程模式
  -I, --snapshot-interval     dump快照間隔時間,默認60s,需要在daemon模式下
  -L, --logfile               使用日志文件,默認標(biāo)準(zhǔn)輸出到終端
  --tz-utc                    備份的時候允許備份Timestamp,這樣會導(dǎo)致不同時區(qū)的備份還原會出問題,默認關(guān)閉,參數(shù):--skip-tz-utc to disable.
  --skip-tz-utc               
  --use-savepoints            使用savepoints來減少采集metadata所造成的鎖時間,需要SUPER權(quán)限
  --success-on-1146           Not increment error count and Warning instead of Critical in case of table doesn't exist
  --lock-all-tables           鎖全表,代替FLUSH TABLE WITH READ LOCK
  -U, --updated-since         Use Update_time to dump only tables updated in the last U days
  --trx-consistency-only      Transactional consistency only
  -h, --host                  The host to connect to
  -u, --user                  Username with privileges to run the dump
  -p, --password              User password
  -P, --port                  TCP/IP port to connect to
  -S, --socket                UNIX domain socket file to use for connection
  -t, --threads               備份執(zhí)行的線程數(shù),默認4個線程
  -C, --compress-protocol     在mysql連接上使用壓縮協(xié)議
  -V, --version               Show the program version and exit
  -v, --verbose               更多輸出, 0 = silent, 1 = errors, 2 = warnings, 3 = info, default 2



myloader
Usage:
  myloader [OPTION...] multi-threaded MySQL loader


Help Options:
  -?, --help                        Show help options


Application Options:
  -d, --directory                   備份文件所在的目錄
  -q, --queries-per-transaction     每個事務(wù)的query數(shù)量, 默認1000
  -o, --overwrite-tables            如果表存在則先刪除,使用該參數(shù),需要備份時候要備份表結(jié)構(gòu),不然還原會找不到表
  -B, --database                    指定需要還原的數(shù)據(jù)庫
  -s, --source-db                   還原的數(shù)據(jù)庫
  -e, --enable-binlog               啟用二進制日志恢復(fù)數(shù)據(jù)
  -h, --host                        The host to connect to
  -u, --user                        Username with privileges to run the dump
  -p, --password                    User password
  -P, --port                        TCP/IP port to connect to
  -S, --socket                      UNIX domain socket file to use for connection
  -t, --threads                     使用的線程數(shù)量,默認4
  -C, --compress-protocol           連接上使用壓縮協(xié)議
  -V, --version                     Show the program version and exit
  -v, --verbose                     更多輸出, 0 = silent, 1 = errors, 2 = warnings, 3 = info, default 2
向AI問一下細節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI