【代码】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
相关文章:
-
-
AIGC重塑金融:AI大模型驱动的金融变革与实践…
-
今天推荐一个可以快速开发 ChatGPT UI 界面的组件库,质量很高,拿来就能用。…
-
H5纯前端Webcodecs+mp4box+WebMMuxer+canvas处理视频,在视频上增加图片显示(可以实现水印效果),而且保留音频。提供完整实现代码。…
-
-
语音是语言的声学表现形式,是人类自然的交流工具。语音识别(Automatic Speech Recognition, ASR 或 Speech to Text, STT)是将语音转…
版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。
发表评论