本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
從 Amazon Aurora 全域資料庫中移除叢集
您可以根據幾個不同的原因,從 Aurora 全域資料庫中移除 Aurora 資料庫叢集。例如,如果主要叢集降級或隔離,您可能想要從 Aurora 全域資料庫移除 Aurora 資料庫叢集。接著它會變為獨立佈建的 Aurora 資料庫叢集,可用於建立新的 Aurora 全域資料庫。如需進一步了解,請參閱從計劃外中斷復原 Amazon Aurora 全域資料庫。
您也可能想要移除 Aurora 資料庫叢集,因為您想要刪除不再需要的 Aurora 全域資料庫。您無法刪除 Aurora 全域資料庫,直至刪除 (分離) 所有關聯的 Aurora 資料庫叢集之後,將主要資料庫叢集設定為最後刪除。如需更多詳細資訊,請參閱 刪除 Amazon Aurora 全域資料庫。
當 Aurora 資料庫叢集從 Aurora 全域資料庫分離時,它不再與主要資料庫叢集保持同步。它會成為具有完整讀取/寫入功能的獨立佈建 Aurora 資料庫叢集。
您可以使用 AWS 管理主控台、AWS CLI 或 RDS API 從 Aurora 全域資料庫移除 Aurora 資料庫叢集。
從 Aurora 全球資料庫中移除 Aurora 叢集
登入 AWS 管理主控台,開啟位於 https://console.aws.amazon.com/rds/
的 Amazon RDS 主控台。 -
在 Databases (資料庫) 頁面上選擇叢集。
-
對於 Actions (動作),選擇 Remove from Global (從全球移除)。
您會看到一個提示,以確認您要從 Aurora 全域資料庫卸離次要叢集。
選擇 Remove and promote (移除並升級),即可從全域資料庫移除叢集。
Aurora 資料庫叢集不再用作 Aurora 全域資料庫中的次要叢集,且不再與主要資料庫叢集同步。它是一個獨立的 Aurora 資料庫叢集,具有完整的讀取/寫入功能。
移除或刪除所有次要叢集之後,您就可以用同樣的方式移除主要叢集。在移除所有次要叢集之前,您無法從 Aurora 全域資料庫中卸離 (移除) 主要 Aurora 資料庫叢集。
Aurora 全域資料庫可能會保留在 Databases (資料庫) 清單中,其中包含零個區域和可用區域。如果您不想再使用此 Aurora 全域資料庫,您可以刪除。如需更多詳細資訊,請參閱 刪除 Amazon Aurora 全域資料庫。
若要從 Aurora 全域資料庫移除 Aurora 叢集,請使用下列參數執行 remove-from-global-cluster CLI 命令:
--global-cluster-identifier– Aurora 全域資料庫的名稱 (識別符)。--db-cluster-identifier– 要從 Aurora 全域資料庫中移除的每個 Aurora 資料庫叢集的名稱。移除主要資料庫叢集之前,請先移除所有次要 Aurora 資料庫叢集
下列範例從 Aurora 全域資料庫中先移除次要叢集,然後移除主要叢集。
對於 Linux、macOS 或 Unix:
aws rds --regionsecondary_region\ remove-from-global-cluster \ --db-cluster-identifiersecondary_cluster_ARN\ --global-cluster-identifierglobal_database_idaws rds --regionprimary_region\ remove-from-global-cluster \ --db-cluster-identifierprimary_cluster_ARN\ --global-cluster-identifierglobal_database_id
針對 Aurora 全域資料庫中的每個次要 AWS 區域,重複此 remove-from-global-cluster --db-cluster-identifier 命令。secondary_cluster_ARN
在 Windows 中:
aws rds --regionsecondary_region^ remove-from-global-cluster ^ --db-cluster-identifiersecondary_cluster_ARN^ --global-cluster-identifierglobal_database_idaws rds --regionprimary_region^ remove-from-global-cluster ^ --db-cluster-identifierprimary_cluster_ARN^ --global-cluster-identifierglobal_database_id
針對 Aurora 全域資料庫中的每個次要 AWS 區域,重複此 remove-from-global-cluster --db-cluster-identifier 命令。secondary_cluster_ARN
若要使用 RDS API 從 Aurora 全球資料庫中移除 Aurora 叢集,請執行 RemoveFromGlobalCluster 動作。