本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
從 RDS Custom for Oracle 資料庫快照還原
當您還原 RDS Custom for Oracle 資料庫執行個體時,您會提供資料庫快照的名稱和新執行個體的名稱。您無法從快照還原至現有的RDS自訂資料庫執行個體。當您還原時,會建立新的 RDS Custom for Oracle 資料庫執行個體。
還原程序與 Amazon 中的還原有下列不同: RDS
-
在還原快照之前,RDSCustom for Oracle 會備份現有的組態檔案。這些檔案可以在目錄
/rdsdbdata/config/backup
中的還原執行個體上取得。RDS Custom for Oracle 會使用預設參數還原資料庫快照,並使用現有參數覆寫先前的資料庫組態檔案。因此,還原的執行個體不會保留自訂參數和對資料庫組態檔案的變更。 -
還原的資料庫名稱與快照中的名稱相同。您無法指定不同的名稱。(針對 RDS Custom for Oracle,預設值為
ORCL
。)
從資料庫快照還原RDS自訂資料庫執行個體
-
登入 AWS Management Console 並在 開啟 Amazon RDS主控台https://console.aws.amazon.com/rds/
。 -
在導覽窗格中,選擇 Snapshots (快照)。
-
選擇想要從中還原的資料庫執行個體。
-
針對 Actions (動作),選擇 Restore snapshot (還原快照)。
-
在還原資料庫執行個體頁面上,針對資料庫執行個體識別符 ,輸入已還原自訂RDS資料庫執行個體的名稱。
-
選擇 Restore DB instance (還原資料庫執行個體)。
您可以使用 restore-db-instance-from-db-snapshot AWS CLI 命令還原RDS自訂資料庫快照。
如果您要從中還原的快照適用於私有資料庫執行個體,請務必指定正確的 db-subnet-group-name
和 no-publicly-accessible
。否則,資料庫執行個體預設為可公開存取。下列選項是必要的:
-
db-snapshot-identifier
– 識別要從中進行還原的快照 -
db-instance-identifier
– 指定要從資料庫快照建立的RDS自訂資料庫執行個體名稱 -
custom-iam-instance-profile
– 指定與RDS自訂資料庫執行個體的基礎 Amazon EC2執行個體相關聯的執行個體設定檔。
下列程式碼會為 my-custom-instance
還原名稱為 my-custom-snapshot
的快照。
用於 Linux, macOS、 或 Unix:
aws rds restore-db-instance-from-db-snapshot \ --db-snapshot-identifier
my-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-identifier
my-custom-snapshot
^ --db-instance-identifiermy-custom-instance
^ --custom-iam-instance-profileAWSRDSCustomInstanceProfileForRdsCustomInstance
^ --no-publicly-accessible