從 RDS Custom for SQL Server 資料庫快照還原
還原 RDS Custom for SQL Server 資料庫執行個體時,您要提供資料庫快照的名稱和新執行個體的名稱。您無法從快照還原至現有的 RDS Custom 資料庫執行個體。還原時,會建立新的 RDS Custom for SQL Server 資料庫執行個體。
從快照還原會將儲存體磁碟區還原至拍攝快照的時間點。這將包括 (D:) 磁碟區上存在的所有資料庫和任何其他檔案。
若要從資料庫快照還原 RDS Custom 資料庫執行個體
-
登入 AWS Management Console,開啟位於 https://console.aws.amazon.com/rds/
的 Amazon RDS 主控台。 -
在導覽窗格中,選擇 Snapshots (快照)。
-
選擇想要從中還原的資料庫執行個體。
-
針對 Actions (動作),選擇 Restore snapshot (還原快照)。
-
在 Restore DB Instance (還原資料庫執行個體) 頁面上,針對 DB Instance Identifier (資料庫執行個體識別符),輸入您還原的 RDS Custom 資料庫執行個體的名稱。
-
選擇 Restore DB instance (還原資料庫執行個體)。
您可以使用 restore-db-instance-from-db-snapshot AWS CLI 命令來還原 RDS Custom 資料庫快照。
如果您要從中還原的快照適用於私有資料庫執行個體,請務必指定正確的 db-subnet-group-name 和 no-publicly-accessible。否則,資料庫執行個體預設為可公開存取。下列選項是必要的:
-
db-snapshot-identifier– 識別要從中進行還原的快照 -
db-instance-identifier– 指定要從資料庫快照建立之 RDS Custom 資料庫執行個體的名稱 -
custom-iam-instance-profile– 指定與 RDS Custom 資料庫執行個體的基礎 Amazon EC2 執行個體關聯的執行個體設定檔。
下列程式碼會為 my-custom-instance 還原名稱為 my-custom-snapshot 的快照。
在 Linux、macOS 或 Unix 中:
aws rds restore-db-instance-from-db-snapshot \ --db-snapshot-identifiermy-custom-snapshot\ --db-instance-identifiermy-custom-instance\ --custom-iam-instance-profileAWSRDSCustomInstanceProfileForRdsCustomInstance\ --no-publicly-accessible
在 Windows 中:
aws rds restore-db-instance-from-db-snapshot ^ --db-snapshot-identifiermy-custom-snapshot^ --db-instance-identifiermy-custom-instance^ --custom-iam-instance-profileAWSRDSCustomInstanceProfileForRdsCustomInstance^ --no-publicly-accessible