根据我的研究,我发现使用 CLI 创建一个 Aurora 集群的唯一方法是从现有快照创建一个内部有实例的实例:
1) 从现有集群创建快照
2) 从快照启动集群
3) 将实例添加到集群中
因此,我使用最新的 AWS CLI 版本运行的命令如下(以及输出):
aws rds create-db-cluster-snapshot \
--db-cluster-snapshot-identifier analytics-replica-db \
--db-cluster-identifier prodcluster
Run Code Online (Sandbox Code Playgroud)
哪个输出
{
"DBClusterSnapshot": {
"Engine": "aurora",
"SnapshotCreateTime": "2017-07-24T15:08:12.836Z",
"VpcId": "vpc-ID",
"DBClusterIdentifier": "cluster_name",
"DBClusterSnapshotArn": "arn:aws:rds:eu-west-1:aws_account:cluster-snapshot:analytics-replica-db",
"MasterUsername": "db_username",
"LicenseModel": "aurora",
"Status": "creating",
"PercentProgress": 0,
"DBClusterSnapshotIdentifier": "analytics-replica-db",
"IAMDatabaseAuthenticationEnabled": false,
"ClusterCreateTime": "2016-04-14T11:10:02.413Z",
"StorageEncrypted": false,
"AllocatedStorage": 1,
"EngineVersion": "5.6.10a",
"SnapshotType": "manual",
"AvailabilityZones": [
"eu-west-1a",
"eu-west-1b",
"eu-west-1c"
],
"Port": 0
}
}
Run Code Online (Sandbox Code Playgroud)
之后,我使用以下命令创建集群:
aws rds restore-db-cluster-from-snapshot \
--db-cluster-identifier analytics-replica-cluster \ …Run Code Online (Sandbox Code Playgroud)