本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
使用 AWS CLI 或 Amazon RDS API 複製未加密的資料庫叢集快照
請根據以下幾節中的程序,使用 AWS 管理主控台、AWS CLI 或 Amazon RDS API 來複製未加密的資料庫叢集快照。
若要取消已開始進行的複製操作,請在資料庫叢集快照處於 copying (複製中) 狀態時,刪除 --target-db-cluster-snapshot-identifier 或 TargetDBClusterSnapshotIdentifier 所識別的目標資料庫叢集快照。
若要使用 AWS 管理主控台 複製資料庫叢集快照,請參閱 使用 AWS 管理主控台 複製資料庫叢集快照。
如要複製資料庫叢集快照,請使用 AWS CLI copy-db-cluster-snapshot 命令。若您要將快照複製至另一個 AWS 區域,請在快照將複製到的 AWS 區域 中執行此命令。
下列選項用來複製未加密的資料庫叢集快照:
-
--source-db-cluster-snapshot-identifier– 要複製之資料庫叢集快照的識別符。若您要將快照複製到另一個 AWS 區域,此識別符必須是來源 AWS 區域 的 ARN 格式。 -
--target-db-cluster-snapshot-identifier– 資料庫叢集快照之新副本的識別符。
下列程式碼會在執行命令的 AWS 區域 中,建立資料庫叢集快照 arn:aws:rds:us-east-1:123456789012:cluster-snapshot:aurora-cluster1-snapshot-20130805 的複本,名稱為 myclustersnapshotcopy。建立副本時,原始快照的所有標籤會複製到快照副本。
範例
對於 Linux、macOS 或 Unix:
aws rds copy-db-cluster-snapshot \ --source-db-cluster-snapshot-identifierarn:aws:rds:us-east-1:123456789012:cluster-snapshot:aurora-cluster1-snapshot-20130805\ --target-db-cluster-snapshot-identifiermyclustersnapshotcopy\ --copy-tags
在 Windows 中:
aws rds copy-db-cluster-snapshot ^ --source-db-cluster-snapshot-identifierarn:aws:rds:us-east-1:123456789012:cluster-snapshot:aurora-cluster1-snapshot-20130805^ --target-db-cluster-snapshot-identifiermyclustersnapshotcopy^ --copy-tags
如要複製資料庫叢集快照,請使用 Amazon RDS API CopyDBClusterSnapshot 作業。若要將快照複製至另一個 AWS 區域,請在快照將複製到的 AWS 區域 中執行此動作。
下列參數用來複製未加密的資料庫叢集快照:
-
SourceDBClusterSnapshotIdentifier– 要複製之資料庫叢集快照的識別符。若您要將快照複製到另一個 AWS 區域,此識別符必須是來源 AWS 區域 的 ARN 格式。 -
TargetDBClusterSnapshotIdentifier– 資料庫叢集快照之新副本的識別符。
下列程式碼會在 美國西部 (加州北部) 區域中建立快照 arn:aws:rds:us-east-1:123456789012:cluster-snapshot:aurora-cluster1-snapshot-20130805 的複本,名稱為 myclustersnapshotcopy。建立副本時,原始快照的所有標籤會複製到快照副本。
範例
https://rds.us-west-1.amazonaws.com/ ?Action=CopyDBClusterSnapshot &CopyTags=true&SignatureMethod=HmacSHA256 &SignatureVersion=4 &SourceDBSnapshotIdentifier=arn%3Aaws%3Ards%3Aus-east-1%3A123456789012%3Acluster-snapshot%3Aaurora-cluster1-snapshot-20130805&TargetDBSnapshotIdentifier=myclustersnapshotcopy&Version=2013-09-09 &X-Amz-Algorithm=AWS4-HMAC-SHA256 &X-Amz-Credential=AKIADQKE4SARGYLE/20140429/us-west-1/rds/aws4_request &X-Amz-Date=20140429T175351Z &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date &X-Amz-Signature=9164337efa99caf850e874a1cb7ef62f3cea29d0b448b9e0e7c53b288ddffed2