当前位置: 首页 > news >正文

TDengine 2.6 taosdump数据导出备份 导入恢复

在这里插入图片描述
官方文档

taosdump 数据导出
cd taos/bin 目录
#导出备份
./taosdump -o ./dump备份目录 -A  -B 5000 -T 4
#备份所有数据库:指定 -A 或 --all-databases 参数;
#备份多个指定数据库:使用 -D db1,db2,... 参数;
# 压缩文件 方便传输tar -zcvf dump.tar.gz ./dump目录
taosdump 数据恢复
# 解压文件 方便传输
tar -zxvf dump.tar.gz
# 导入
taosdump -i ./dump导出文件存放路径
docker处理导入
docker -V 挂载的磁盘目录,上传备份文件
C:\Users\S>docker ps
CONTAINER ID   IMAGE                        COMMAND                   CREATED        STATUS         PORTS                                                                                                                                        NAMES
36aa282750d4   tdengine/tdengine:2.6.0.34   "/tini -- /usr/bin/e…"   9 months ago   Up 2 minutes   0.0.0.0:6030->6030/tcp, 0.0.0.0:6041->6041/tcp, 0.0.0.0:6043-6049->6043-6049/tcp, 0.0.0.0:6060->6060/tcp, 0.0.0.0:6044-6045->6044-6045/udp   td2.6C:\Users\S>docker exec  -it 36aa282750d4  bash
root@36aa282750d4:~# cd /usr/local/taos/bin
root@36aa282750d4:/usr/local/taos/bin# taosdump -i /tmp/dump挂载的目录
taosdump命令行参数
Usage: taosdump [OPTION...] dbname [tbname ...]or:  taosdump [OPTION...] --databases db1,db2,...or:  taosdump [OPTION...] --all-databasesor:  taosdump [OPTION...] -i inpathor:  taosdump [OPTION...] -o outpath-h, --host=HOST            Server host dumping data from. Default islocalhost.-p, --password             User password to connect to server. Default istaosdata.-P, --port=PORT            Port to connect-u, --user=USER            User name used to connect to server. Default isroot.-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 separatedatabases' 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 filechecking!-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 orISO8601/RFC3339 format is acceptable. ISO8601format example: 2017-10-01T00:00:00.000+0800 or2017-10-0100:00:00:000+0800 or '2017-10-0100:00:00.000+0800'-E, --end-time=END_TIME    End time to dump. Either epoch or ISO8601/RFC3339format is acceptable. ISO8601 format example:2017-10-01T00:00:00.000+0800 or2017-10-0100:00:00.000+0800 or '2017-10-0100:00:00.000+0800'-B, --data-batch=DATA_BATCH   Number of data per query/insert statement whenbackup/restore. Default value is 16384. If you see'error actual dump .. batch ..' when backup or ifyou see 'WAL size exceeds limit' error whenrestore, please adjust the value to a smaller oneand try. The workable value is related to thelength 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 nameuse 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 is8.-C, --cloud=CLOUD_DSN      specify a DSN to access TDengine cloud service-R, --restful              Use RESTful interface to connect TDengine-t, --timeout=SECONDS      The timeout seconds for websocket to interact.-g, --debug                Print debug info.-?, --help                 Give this help list--usage                Give a short usage message-V, --version              Print program versionMandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.Report bugs to <support@taosdata.com>.
http://www.dtcms.com/a/394911.html

相关文章:

  • 探索 Yjs 协同应用场景 - 分布式撤销管理
  • 【软考中级 - 软件设计师 - 基础知识】数据结构之栈与队列​
  • LeetCode 385 迷你语法分析器 Swift 题解:从字符串到嵌套数据结构的解析过程
  • windows系统使用sdkman管理java的jdk版本,WSL和Git Bash哪个更能方便管理jdk版本
  • 生产环境K8S的etcd备份脚本
  • Mac电脑多平台Git账号配置
  • Etcd详解:Kubernetes的大脑与记忆库
  • 深刻理解PyTorch中RNN(循环神经网络)的output和hn
  • 大模型如何赋能写作:从创作到 MCP 自动发布的全链路解析
  • C++设计模式之创建型模式:工厂方法模式(Factory Method)
  • 传输层协议——UDP/TCP
  • 三板汇茶咖空间签约“可信资产IPO与数链金融RWA”链改2.0项目联合实验室
  • 【MySQL】MySQL 表文件误删导致启动失败及无法外部连接解决方案
  • LVS简介
  • 如何将联系人从iPhone转移到iPhone的7种方法
  • 『 MySQL数据库 』MySQL复习(一)
  • 3005. 最大频率元素计数
  • ACP(七)优化RAG应用提升问答准确度
  • 鸿蒙:使用bindPopup实现气泡弹窗
  • Langchan4j 框架 AI 无限循环调用文件创建工具解决方案记录
  • Python GIS 开发里最核心的4个基础组件(理论+实操篇)
  • 关于跨域和解决方案
  • 学习日报 20250921|LoadingCache
  • 聚力赋能|竹云受邀出席2025华为全联接大会
  • 抓取 Dump 文件与 WinDbg 使用详解:定位 Windows 程序异常的利器
  • 计算机组成原理:指令周期
  • 老题新解|简单算术表达式求值
  • RustFS与其他新兴存储系统(如SeaweedFS)相比有哪些优势和劣势?
  • WPS标点符号换行问题解决
  • 开发团队的文档自动化革命:WPS+cpolar实战录