mysql 归档工具 pt-archiver

参数丰富 能够指定是否删除原数据 sleep 间隔 提前在目标库中创建好地址即可

 

pt-archiver --source h=127.0.0.1,u=root,p=root_pass,P=3306,D=dba_test,t=t2 --dest h=127.0.0.1,P=3306,u=root,p=root_pass,D=dba_test,t=t2_201905  --progress 5000 --no-check-charset --where "1=1" --statistics --charset=UTF8 --limit=10000 --txn-size 1000 --no-delete
 
pt-archiver --source h=127.0.0.1,u=root,p=root_pass,P=3306,D=dba_test,t=user --dest h=127.0.0.1,P=3306,u=root,p=root_pass,D=dba_test,t=user_201905  --progress 10000 --no-check-charset --where "id<10000" --statistics --charset=UTF8 --limit=10000 --txn-size 1000 
 
 
posted @ 2019-05-30 11:59  mhabbyo  阅读(464)  评论(0编辑  收藏  举报