六月婷婷AV,国产偷窥猎奇福利二区,日韩三级片。,好吊色网站,日韩成人中文在线视频,国产亚洲午夜啪啪,亚洲欧美另类国产精品,国产成人av1,任你艹在线观看

taosdump

簡(jiǎn)介

taosdump 是一個(gè)支持從運(yùn)行中的 TDengine 服務(wù)器或集群中備份數(shù)據(jù)并將備份的數(shù)據(jù)恢復(fù) 到相同或另一個(gè)運(yùn)行中的 TDengine 服務(wù)器或集群中的工具應(yīng)用程序。

taosdump可以用數(shù)據(jù)庫(kù)、超級(jí)表或普通表作為邏輯數(shù)據(jù)單元備份,也可以對(duì)數(shù)據(jù)庫(kù)、超級(jí) 表和普通表中指定時(shí)間段內(nèi)的數(shù)據(jù)記錄進(jìn)行備份。您可以指定數(shù)據(jù)備份的目錄路徑,如果 不指定位置,taosdump默認(rèn)會(huì)將數(shù)據(jù)備份到當(dāng)前目錄。

如果指定的位置已經(jīng)有數(shù)據(jù)文件,taosdump 會(huì)提示用戶并立即退出,避免數(shù)據(jù)被覆蓋。 如果您看到提示,請(qǐng)小心操作。

taosdump 是一個(gè)邏輯備份工具。它不打算或不應(yīng)被期望用于備份任何原始數(shù)據(jù)、環(huán)境設(shè)置、 硬件信息、服務(wù)端配置或集群的拓?fù)浣Y(jié)構(gòu)。它使用 Apache AVRO作為數(shù)據(jù)文件格式來存儲(chǔ)備份數(shù)據(jù)。

常用使用場(chǎng)景

taosdump 備份數(shù)據(jù)

  1. 指定 -A 或 --all-databases 參數(shù)指定所有數(shù)據(jù)庫(kù);
  2. 使用 -D db1,db2,... 參數(shù)備份指定的多個(gè)數(shù)據(jù)庫(kù);
  3. 使用 dbname stbname1 stbname2 tbname1 tbname2 ... 參數(shù)方式備份指定數(shù)據(jù)庫(kù)中的某些個(gè)超級(jí)表或普通表,注意這種輸入序列第一個(gè)參數(shù)為數(shù)據(jù)庫(kù)名稱,且只支持一個(gè)數(shù)據(jù)庫(kù),第二個(gè)和之后的參數(shù)為該數(shù)據(jù)庫(kù)中的超級(jí)表或普通表名稱,中間以空格分隔;
  4. TDengine 服務(wù)器或集群通常會(huì)包含一個(gè)系統(tǒng)數(shù)據(jù)庫(kù),名為 log,這個(gè)數(shù)據(jù)庫(kù)內(nèi)的數(shù)據(jù)為 TDengine 自我運(yùn)行的數(shù)據(jù),taosdump 默認(rèn)不會(huì)對(duì) log 庫(kù)進(jìn)行備份。如果有特定需求對(duì) log 庫(kù)進(jìn)行備份,可以使用 -a 或 --allow-sys 命令行參數(shù)。
  5. taosdump 1.4.1 之后的版本提供 -n 參數(shù)和 -L 參數(shù),用于備份數(shù)據(jù)時(shí)不使用轉(zhuǎn)義字符和“寬容”模式,可以在表名、列名、標(biāo)簽名沒使用轉(zhuǎn)義字符的情況下減少備份數(shù)據(jù)時(shí)間和備份數(shù)據(jù)占用空間。如果不確定符合使用 -n 和 -L 條件時(shí)請(qǐng)使用默認(rèn)參數(shù)進(jìn)行“嚴(yán)格”模式進(jìn)行備份。轉(zhuǎn)義字符的說明請(qǐng)參考官方文檔。
  6. taosdump 1.4.1 之后的版本提供 -I 參數(shù),用于解析 avro 文件 schema 和數(shù)據(jù),如果指定 -s 參數(shù)將只解析 schema。
  7. taosdump 1.4.2 之后的備份使用 -B 參數(shù)指定的批次數(shù),默認(rèn)值為 16384,如果在某些環(huán)境下由于網(wǎng)絡(luò)速度或磁盤性能不足導(dǎo)致 "Error actual dump .. batch .." 可以通過 -B 參數(shù)挑戰(zhàn)為更小的值進(jìn)行嘗試。

taosdump恢復(fù)數(shù)據(jù)

  1. -i 加上數(shù)據(jù)文件所在路徑作為參數(shù)進(jìn)行備份指定路徑下的數(shù)據(jù)文件。如前面提及,不應(yīng)該使用同一個(gè)目錄備份不同數(shù)據(jù)集合,也不應(yīng)該在同一路徑多次備份同一數(shù)據(jù)集,否則備份數(shù)據(jù)會(huì)造成覆蓋或多次備份。
  2. taosdump 內(nèi)部使用 TDengine stmt binding API 進(jìn)行恢復(fù)數(shù)據(jù)的寫入,為提高數(shù)據(jù)恢復(fù)性能,目前使用 16384 為一次寫入批次。如果備份數(shù)據(jù)中有比較多列數(shù)據(jù),可能會(huì)導(dǎo)致產(chǎn)生 "WAL size exceeds limit" 錯(cuò)誤,此時(shí)可以通過使用 -B 參數(shù)調(diào)整為一個(gè)更小的值進(jìn)行嘗試。

詳細(xì)命令行參數(shù)列表

以下為 taosdump 詳細(xì)命令行參數(shù)列表:

Usage: taosdump [OPTION...] dbname [tbname ...]
  or:  taosdump [OPTION...] --databases db1,db2,... 
  or:  taosdump [OPTION...] --all-databases
  or:  taosdump [OPTION...] -i inpath
  or:  taosdump [OPTION...] -o outpath

  -h, --host=HOST            Server host dumping data from. Default is
                             localhost.
  -p, --password             User password to connect to server. Default is
                             taosdata.
  -P, --port=PORT            Port to connect
  -u, --user=USER            User name used to connect to server. Default is
                             root.
  -c, --config-dir=CONFIG_DIR   Configure directory. Default is /etc/taos
  -i, --inpath=INPATH        Input file path.
  -o, --outpath=OUTPATH      Output file path.
  -r, --resultFile=RESULTFILE   DumpOut/In Result file path and name.
  -a, --allow-sys            Allow to dump system database
  -A, --all-databases        Dump all databases.
  -D, --databases=DATABASES  Dump inputted databases. Use comma to separate
                             databases' name.
  -N, --without-property     Dump database without its properties.
  -s, --schemaonly           Only dump tables' schema.
  -y, --answer-yes           Input yes for prompt. It will skip data file
                             checking!
  -d, --avro-codec=snappy    Choose an avro codec among null, deflate, snappy,
                             and lzma.
  -S, --start-time=START_TIME   Start time to dump. Either epoch or
                             ISO8601/RFC3339 format is acceptable. ISO8601
                             format example: 2017-10-01T00:00:00.000+0800 or
                             2017-10-0100:00:00:000+0800 or '2017-10-01
                             00:00:00.000+0800'
  -E, --end-time=END_TIME    End time to dump. Either epoch or ISO8601/RFC3339
                             format is acceptable. ISO8601 format example:
                             2017-10-01T00:00:00.000+0800 or
                             2017-10-0100:00:00.000+0800 or '2017-10-01
                             00:00:00.000+0800'
  -B, --data-batch=DATA_BATCH   Number of data per query/insert statement when
                             backup/restore. Default value is 16384. If you see
                             'error actual dump .. batch ..' when backup or if
                             you see 'WAL size exceeds limit' error when
                             restore, please adjust the value to a smaller one
                             and try. The workable value is related to the
                             length of the row and type of table schema.
  -I, --inspect              inspect avro file content and print on screen
  -L, --loose-mode           Using loose mode if the table name and column name
                             use letter and number only. Default is NOT.
  -n, --no-escape            No escape char '`'. Default is using it.
  -T, --thread-num=THREAD_NUM   Number of thread for dump in file. Default is
                             5.
  -g, --debug                Print debug info.
  -?, --help                 Give this help list
      --usage                Give a short usage message
  -V, --version              Print program version

Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.

Report bugs to <support@taosdata.com>.