I am new in amazon web Services. How to copy RDS Snapshot one region to another Region using aws-sdk-api java programmatic.
问问题
378 次
1 回答
1
您需要确保AmazonRDSClient
在特定区域中创建,并且在创建时CopyDBSnapshotRequest
引用具有完整标识符的快照。
这里有一些从 us-east 区域复制到 eu_central 区域的伪代码
AmazonRDSClient rdsClient = new AmazonRDSClient(/*add your credentials and the proper constructor overload*/);
rdsClient.setRegion(Region.getRegion(Regions.EU_CENTRAL_1));
CopyDBSnapshotRequest copySnapshot = new CopyDBSnapshotRequest();
copySnapshot.setSourceDBSnapshotIdentifier("arn:aws:rds:us-east-1:123456789012:snapshot:mysql-instance1-snapshot-20130805");
copySnapshot.setTargetDBSnapshotIdentifier("mysql-instance1-snapshot-20130805-copy");
DBSnapshot dbSnapshot = rdsClient.copyDBSnapshot(copySnapshot);
于 2015-10-02T07:56:26.530 回答