步骤一,在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
发表评论