Data Export
Alibaba cloud OSS backup and restoreβ
StarRocks supports backing up data to alicloud OSS / AWS S3 (or object storage compatible with S3 protocol). Suppose there are two StarRocks clusters, namely DB1 cluster and DB2 cluster. We need to back up the data in DB1 to alicloud OSS and then restore it to DB2 when necessary. The general process of backup and recovery is as follows:
Create a cloud repositoryβ
Execute SQL in DB1 and DB2 respectively:
CREATE REPOSITORY `repository name`
WITH BROKER `broker_name`
ON LOCATION "oss://bucket name/path"
PROPERTIES
(
"fs.oss.accessKeyId" = "xxx",
"fs.oss.accessKeySecret" = "yyy",
"fs.oss.endpoint" = "oss-cn-beijing.aliyuncs.com"
);
a. Both DB1 and DB2 need to be created, and the created REPOSITORY name should be the same. View the repository:
SHOW REPOSITORIES;
b. broker_ name needs to fill in the broker name in a cluster. View BrokerName:
SHOW BROKER;
c. The path after fs.oss.endpoint does not need to have a bucket name.