本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
從 RDS Custom for Oracle 資料庫快照還原
還原 RDS Custom for Oracle 資料庫執行個體時,您要提供資料庫快照的名稱和新執行個體的名稱。您無法從快照還原至現有的 RDS Custom 資料庫執行個體。還原時,會建立新的 RDS Custom for Oracle 資料庫執行個體。
還原程序與在 Amazon RDS 中還原的方式有以下不同:
-
還原快照之前,RDS Custom for Oracle 會先備份現有的組態檔案。這些檔案可以在目錄
/rdsdbdata/config/backup中的還原執行個體上取得。RDS Custom for Oracle 會使用預設參數還原資料庫快照,並使用現有的資料庫組態檔案覆寫先前的資料庫組態檔案。因此,還原的執行個體不會保留自訂參數和對資料庫組態檔案的變更。 -
還原的資料庫名稱與快照中的名稱相同。您無法指定不同的名稱。(對於 RDS Custom for Oracle,預設值為
ORCL。)
若要從資料庫快照還原 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