Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Mit Google Distributed Cloud (GDC) Air-Gapped können Sie Wartungszeiträume konfigurieren, um Zeiten für automatische Updates zu planen. Wartungsfenster sind so konzipiert, dass sie auf Zeiten ausgerichtet sind, in denen kurze Ausfallzeiten für Ihre Datenbankcluster die geringste Auswirkung haben. Sie können Wartungsfenster nach Wochentag und Stunde sowie nach Dauer planen. Sie können beispielsweise ein Wartungsfenster festlegen, das am Dienstag um 3:00 Uhr beginnt und acht Stunden dauert.
Sie können auch Wartungsausschlüsse planen, um Unterbrechungen Ihrer Arbeitslasten in Zeiträumen zu verhindern, in denen Sie aufgrund besonderer Umstände das festgelegte Wartungsfenster nicht zulassen möchten.
Wartungsfenster erstellen
So erstellen Sie ein Wartungsfenster für Ihren Datenbankcluster:
Console
Wählen Sie im Navigationsmenü der GDC-Konsole Database Service aus.
Wählen Sie den Datenbankcluster aus, für den Sie Wartungseinstellungen planen möchten.
Klicken Sie im Abschnitt Wartung auf BearbeitenBearbeiten.
Wählen Sie die Startzeit und die Dauer für das Wartungsfenster aus. Wählen Sie außerdem die Wochentage aus, für die das Wartungsfenster gelten soll.
Klicken Sie auf Wartungsausschluss hinzufügen, um einen Wartungsausschluss anzuwenden.
Geben Sie dem Ausschluss einen Namen und definieren Sie das Zeitfenster, das für Ihr Wartungsfenster ausgeschlossen werden soll.
Klicken Sie auf Speichern.
gdcloud
Führen Sie den folgenden Befehl aus, um ein Wartungsfenster für Ihren Datenbankcluster zu erstellen:
PROJECT_ID: Die ID des Projekts, in dem die Wartungsrichtlinie erstellt werden soll.
DAYS_OF_WEEK: Durch Kommas getrennte Liste der Wochentage, an denen die Wartung beginnen kann. Zulässige Werte sind Wochentage im RFC-822-Format, z. B. Mon.
START_TIME: Die Tageszeit in der UTC-Zeitzone, zu der die Wartung beginnen kann. Der Wert muss dem Format hh:mm entsprechen, z. B. 20:36.
DURATION: Die maximale Dauer der Wartung, z. B. 2h3m.
So wenden Sie einen Wartungsausschluss auf Ihr Wartungsfenster an:
PROJECT_ID: Die ID des Projekts, in dem die Wartungsrichtlinie erstellt werden soll.
EXCLUSION_NAME: Der Name des neuen Wartungsausschlusses, der hinzugefügt werden soll.
START_TIME: Das Startdatum und die Startzeit für den neuen Wartungsausschluss. Zulässige Werte müssen dem RFC-3339-formatierten Zeitstempel entsprechen, z. B. 2006-01-02T15:04:05Z.
END_TIME: Das Enddatum und die Endzeit für den neuen Wartungsausschluss. Zulässige Werte müssen dem RFC-3339-formatierten Zeitstempel entsprechen, z. B. 2006-01-02T15:04:05Z.
Prüfen Sie, ob die Wartungsrichtlinie vorhanden ist und die gewünschte Konfiguration widerspiegelt:
gdcloudmaintenancepolicieslist--projectPROJECT_ID
Führen Sie den folgenden Befehl aus, um die Wartungsrichtlinie an Ihren Datenbankcluster anzuhängen:
POLICY_BINDING_NAME: Der Name der Ressourcenbindung der Richtlinie.
PROJECT_ID: Die ID des Projekts, in dem die Wartungsrichtlinie erstellt werden soll.
POLICY_NAME: Der Name der Wartungsrichtlinie, die im vorherigen Schritt erstellt wurde.
RESOURCE_NAME: Der Ressourcenname, an den gebunden werden soll.
Für einen Datenbankclusternamen my-cluster wäre der Ressourcenname für jede der verfügbaren Datenbank-Engines beispielsweise so:
POLICY_BINDING_NAME: Der Name der Bindung der Wartungsrichtlinie.
PROJECT_ID: Die ID des Projekts, in dem die Wartungsrichtlinie vorhanden ist.
Wartungsausschlüsse verwalten
Wenn Sie einen Wartungsausschluss für Ihr Wartungsfenster erstellt haben, können Sie den Ausschluss bearbeiten oder entfernen, ohne das Wartungsfenster zu ändern. So bearbeiten oder entfernen Sie einen Wartungsausschluss:
Console
Wählen Sie im Navigationsmenü der GDC-Konsole Database Service aus.
Wählen Sie den Datenbankcluster aus, für den Sie einen Wartungsausschluss verwalten möchten.
Klicken Sie im Abschnitt Wartung auf BearbeitenBearbeiten.
Bearbeiten Sie die Zeiträume und Startzeiten des Ausschlusses. Wenn Sie den Ausschluss löschen möchten, klicken Sie auf LöschenLöschen.
Klicken Sie auf Speichern, um die Änderungen an den Wartungsausschlüssen für das Wartungsfenster zu speichern.
gdcloud
Mit der gcloud CLI können nur Wartungsausschlüsse hinzugefügt und gelöscht werden. Wenn Sie den Datums- oder Zeitbereich für den Ausschluss ändern möchten, müssen Sie den vorhandenen Ausschluss löschen und einen neuen hinzufügen.
Führen Sie Folgendes aus, um einen Wartungsausschluss zu löschen:
PROJECT_ID: Die ID des Projekts, in dem die Wartungsrichtlinie vorhanden ist.
EXCLUSION_NAME: Der Name des neuen Wartungsausschlusses, der hinzugefügt werden soll.
START_TIME: Das Startdatum und die Startzeit für den neuen Wartungsausschluss. Zulässige Werte müssen dem RFC-3339-formatierten Zeitstempel entsprechen, z. B. 2006-01-02T15:04:05Z.
END_TIME: Das Enddatum und die Endzeit für den neuen Wartungsausschluss. Zulässige Werte müssen dem RFC-3339-formatierten Zeitstempel entsprechen, z. B. 2006-01-02T15:04:05Z.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[],[],null,["# Plan maintenance windows\n\nGoogle Distributed Cloud (GDC) air-gapped offers you the ability to configure maintenance\nwindows to schedule times for automatic updates. Maintenance windows are\ndesigned to target times where a brief downtime causes the lowest impact to your\ndatabase clusters. You can schedule maintenance windows based on day of the week\nand hour, and length in which the maintenance window is open. For example, you\ncould set a maintenance window to start at 3:00 AM on Tuesdays that spans eight\nhours.\n\nYou can also plan maintenance exclusions, which prevents disruptions to your\nworkloads during date ranges where, due to unique circumstances, you don't\nwant to allow the set maintenance window.\n\nCreate a maintenance window\n---------------------------\n\nTo create a maintenance window for your database cluster, complete the\nfollowing steps: \n\n### Console\n\n1. From the navigation menu of the GDC console, choose **Database\n Service**.\n\n2. Select the database cluster that you want to plan maintenance settings\n for.\n\n3. In the **Maintenance** section, click\n edit **Edit**.\n\n4. Select the **Start time** and **Length** for the maintenance window. Also\n select the days of the week to apply the maintenance window for.\n\n | **Important:** Due to other possible processes running when the maintenance window opens for your database cluster, automatic updates for your database cluster could have a delayed start. The maintenance window length defines when the maintenance processes can start. After maintenance on the database cluster starts, the process runs until completion, possibly running past the defined maintenance window.\n\n5. To apply a maintenance exclusion, click **Add Maintenance Exclusion**.\n\n6. Give the exclusion a name and define the time window to exclude for\n your maintenance window.\n\n7. Click **Save**.\n\n### gdcloud\n\n1. To create a maintenance window for your database cluster, run:\n\n gdcloud maintenance policies create \u003cvar translate=\"no\"\u003ePOLICY_NAME\u003c/var\u003e \\\n --project \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e \\\n --weekly-cycle-days \u003cvar translate=\"no\"\u003eDAYS_OF_WEEK\u003c/var\u003e \\\n --weekly-cycle-start-time \u003cvar translate=\"no\"\u003eSTART_TIME\u003c/var\u003e \\\n --weekly-cycle-duration \u003cvar translate=\"no\"\u003eDURATION\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePOLICY_NAME\u003c/var\u003e: The name of the maintenance policy.\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: The ID of the project in which to create the maintenance policy.\n - \u003cvar translate=\"no\"\u003eDAYS_OF_WEEK\u003c/var\u003e: Comma-separated list of days of the week when maintenance can begin. Accepted values are RFC-822 formatted days of the week, such as `Mon`.\n - \u003cvar translate=\"no\"\u003eSTART_TIME\u003c/var\u003e: The time of the day, in UTC timezone, when maintenance can begin. The value must follow the `hh:mm` format, such as `20:36`.\n - \u003cvar translate=\"no\"\u003eDURATION\u003c/var\u003e: The maximum duration that the maintenance can last for, such as `2h3m`.\n2. To apply a maintenance exclusion to your maintenance window, run:\n\n gdcloud maintenance policies update \u003cvar translate=\"no\"\u003ePOLICY_NAME\u003c/var\u003e \\\n --project \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e \\\n --add-exclusion-name \u003cvar translate=\"no\"\u003eEXCLUSION_NAME\u003c/var\u003e \\\n --add-exclusion-start \u003cvar translate=\"no\"\u003eSTART_TIME\u003c/var\u003e \\\n --add-exclusion-end \u003cvar translate=\"no\"\u003eEND_TIME\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePOLICY_NAME\u003c/var\u003e: The name of the maintenance policy.\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: The ID of the project in which to create the maintenance policy.\n - \u003cvar translate=\"no\"\u003eEXCLUSION_NAME\u003c/var\u003e: The name of the new maintenance exclusion to add.\n - \u003cvar translate=\"no\"\u003eSTART_TIME\u003c/var\u003e: The start date and time for the new maintenance exclusion. Accepted values must follow the RFC-3339 formatted timestamp, such as `2006-01-02T15:04:05Z`.\n - \u003cvar translate=\"no\"\u003eEND_TIME\u003c/var\u003e: The end date and time for the new maintenance exclusion. Accepted values must follow the RFC-3339 formatted timestamp, such as `2006-01-02T15:04:05Z`.\n3. Verify the maintenance policy exists and reflects your intended\n configuration:\n\n gdcloud maintenance policies list --project \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\n\n4. To attach the maintenance policy to your database cluster, run:\n\n gdcloud maintenance policy-bindings create \u003cvar translate=\"no\"\u003ePOLICY_BINDING_NAME\u003c/var\u003e \\\n --project \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e \\\n --policy-name \u003cvar translate=\"no\"\u003ePOLICY_NAME\u003c/var\u003e \\\n --resource-name \u003cvar translate=\"no\"\u003eRESOURCE_NAME\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePOLICY_BINDING_NAME\u003c/var\u003e: The name of the policy binding resource.\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: The ID of the project in which to create the maintenance policy.\n - \u003cvar translate=\"no\"\u003ePOLICY_NAME\u003c/var\u003e: The name of the maintenance policy created in the previous step.\n - \u003cvar translate=\"no\"\u003eRESOURCE_NAME\u003c/var\u003e: The resource name to bind to.\n For example, for a database cluster name `my-cluster`, the resource\n name for each of the available database engines would be the following:\n\n - AlloyDB Omni: `DBCluster.alloydbomni.dbadmin.gdc.goog/my-cluster`\n - Oracle: `DBCluster.oracle.dbadmin.gdc.goog/my-cluster`\n - PostGreSQL: `DBClusters.postgresql.dbadmin.gdc.goog/my-cluster`\n5. Verify the policy binding exists, and its `Valid` condition is `True`:\n\n gdcloud maintenance policy-bindings list --project \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with the ID of the project in\n which to create the maintenance policy.\n\nRemove a maintenance window\n---------------------------\n\nTo remove a maintenance window for your database cluster, complete the\nfollowing steps: \n\n### Console\n\n1. From the navigation menu of the GDC console, choose **Database\n Service**.\n\n2. Select the database cluster that you want to plan maintenance settings\n for.\n\n3. In the **Maintenance** section, click\n edit **Edit**.\n\n4. In the **Length** field, select **24h**.\n\n5. Select all the days of the week.\n\n6. Click **Save**.\n\nThis removes the defined maintenance window and allows maintenance updates\nto start at any time.\n\n### gdcloud\n\n1. To remove a maintenance window from your database cluster, run:\n\n gdcloud maintenance policies delete \u003cvar translate=\"no\"\u003ePOLICY_NAME\u003c/var\u003e \\\n --project \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePOLICY_NAME\u003c/var\u003e: The name of the maintenance policy.\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: The ID of the project in which the maintenance policy exists.\n2. Remove the maintenance policy binding from the database cluster:\n\n gdcloud maintenance policy-bindings delete \u003cvar translate=\"no\"\u003ePOLICY_BINDING_NAME\u003c/var\u003e \\\n --project \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePOLICY_BINDING_NAME\u003c/var\u003e: The name of the maintenance policy binding.\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: The ID of the project in which the maintenance policy exists.\n\nManage maintenance exclusions\n-----------------------------\n\nIf you created a maintenance exclusion for your maintenance window, you can edit\nor remove the exclusion without affecting the maintenance window. To edit or\nremove a maintenance exclusion, complete the following steps: \n\n### Console\n\n1. From the navigation menu of the GDC console, choose **Database\n Service**.\n\n2. Select the database cluster that you want to manage a maintenance\n exclusion for.\n\n3. In the **Maintenance** section, click\n edit **Edit**.\n\n4. Edit the date ranges and start times of the exclusion. If you want to\n delete the exclusion, click\n delete **Delete**.\n\n5. Click **Save** to save your maintenance exclusion modifications to the\n maintenance window.\n\n### gdcloud\n\nThe gdcloud CLI only supports adding and deleting maintenance\nexclusions. Therefore, you must delete the existing exclusion and add a new\none if you want to modify your exclusion date range or times.\n\n1. To delete a maintenance exclusion, run:\n\n gdcloud maintenance policies update \u003cvar translate=\"no\"\u003ePOLICY_NAME\u003c/var\u003e \\\n --project \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e \\\n --remove-exclusion-name \u003cvar translate=\"no\"\u003eEXCLUSION_NAME\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePOLICY_NAME\u003c/var\u003e: The name of the maintenance policy.\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: The ID of the project in which to delete the maintenance policy's exclusion.\n - \u003cvar translate=\"no\"\u003eEXCLUSION_NAME\u003c/var\u003e: The name of the maintenance exclusion to delete.\n2. To add a new maintenance exclusion to apply any previous exclusion edits,\n run:\n\n gdcloud maintenance policies update \u003cvar translate=\"no\"\u003ePOLICY_NAME\u003c/var\u003e \\\n --project \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e \\\n --add-exclusion-name \u003cvar translate=\"no\"\u003eEXCLUSION_NAME\u003c/var\u003e \\\n --add-exclusion-start \u003cvar translate=\"no\"\u003eSTART_TIME\u003c/var\u003e \\\n --add-exclusion-end \u003cvar translate=\"no\"\u003eEND_TIME\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePOLICY_NAME\u003c/var\u003e: The name of the maintenance policy.\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: The ID of the project in which the maintenance policy exists.\n - \u003cvar translate=\"no\"\u003eEXCLUSION_NAME\u003c/var\u003e: The name of the new maintenance exclusion to add.\n - \u003cvar translate=\"no\"\u003eSTART_TIME\u003c/var\u003e: The start date and time for the new maintenance exclusion. Accepted values must follow the RFC-3339 formatted timestamp, such as `2006-01-02T15:04:05Z`.\n - \u003cvar translate=\"no\"\u003eEND_TIME\u003c/var\u003e: The end date and time for the new maintenance exclusion. Accepted values must follow the RFC-3339 formatted timestamp, such as `2006-01-02T15:04:05Z`."]]