当前位置: 代码网 > 服务器>服务器>Linux > doris跨hdfs集群迁移数据

doris跨hdfs集群迁移数据

2024年08月01日 Linux 我要评论
【代码】doris跨hdfs集群迁移数据。

 

官网-数据备份

步骤一,在doris a集群执行:
create repository `repotestall`
with broker `broker_name`
on location "hdfs://xx.xx.xx.xx:9000/repotestall"
properties
(
   "username" = "user",
   "password" = "password"
);


步骤二:
backup snapshot test.snapshotalldoris
to repotestall
on (tablea,tableb,tablec)
properties ("type" = "full");


步骤三:把文件物理复制到另一个集群。
hadoop fs -get /repotestall  /doris_send
scp -r  -p11112  /doris_send/repotestall  root@xxxxxx:/doris_accept


步骤四:在b集群上传到目录。
hadoop fs -put * /repotestall


步骤五:在dorisb集群创建repository
create repository `repotestall`
with broker `broker_name`
on location "hdfs://b集群的地址/repotestall"
properties
(
   "username" = "user",
   "password" = "password"
);

步骤六:在doris b集群执行:
show snapshot on repotestall where snapshot = "snapshotalldoris";
根据获取的修改下边的时间

restore snapshot test.snapshotalldoris
from repotestall  
on (tablea,tableb,tablec) 
properties
(
    "replication_num" = "1", 
    "backup_timestamp"= "2023-06-01-16-11-33" 
);

中间若干查看命令:

查看最近一次 restore 作业的执行情况:show restore\g;   

查看最近一次 backup 作业的执行情况:show backup

创建一个远端仓库路径,用于备份或恢复:create repository

删除已创建的远端仓库。删除仓库: drop repository

查看broker的情况:show broker 

(0)

相关文章:

版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com