Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Auf dieser Seite finden Sie eine Anleitung zum Erstellen von Sicherungsplänen für Harbor-Instanzen in Google Distributed Cloud (GDC) Air-Gap.
Der Sicherungsplan verweist auf die Harbor-Instanz, die gesichert wird. In Sicherungsplänen werden wichtige Komponenten für Sicherungen definiert, z. B. der Sicherungszeitplan und die Aufbewahrungsrichtlinie. GDC erstellt Sicherungen automatisch, je nach der Konfiguration, die Sie im Sicherungsplan angeben. Sie können auch eine manuelle On-Demand-Sicherung erstellen, die einige Werte aus dem Sicherungsplan übernimmt.
Hinweise
Zum Erstellen eines Sicherungsplans benötigen Sie Zugriff auf Folgendes:
Die erforderlichen Identitäts- und Zugriffsrollen:
Harbor-Instanzadministrator: Hat vollständigen Zugriff zum Verwalten von Harbor-Instanzen in einem Projekt. Bitten Sie Ihren IAM-Administrator der Organisation, Ihnen die Rolle „Harbor Instance Admin“ (harbor-instance-admin) zuzuweisen.
Secret Admin: erforderlich für die Nutzung der GDC-Konsole. Bitten Sie Ihren IAM-Administrator der Organisation, Ihnen die Rolle „Secret Admin“ (secret-admin) zuzuweisen.
Erstellen Sie ein Repository in der GDC Console oder über die API.
Console
Melden Sie sich in der GDC-Konsole an.
Klicken Sie im Navigationsmenü auf Sicherung für Harbor-Instanz.
Klicken Sie auf Sicherungspläne.
Klicken Sie auf Sicherungsplan erstellen.
Wählen Sie im Menü Zone die Zone aus.
Wählen Sie im Menü Harbor-Instanzquelle die Harbor-Instanz aus, für die mit diesem Sicherungsplan Sicherungen erstellt werden.
Geben Sie im Feld Name des Sicherungsplans einen Namen für den Sicherungsplan ein.
Optional: Geben Sie im Feld Beschreibung des Sicherungsplans eine Beschreibung ein, um diesen Sicherungsplan von anderen zu unterscheiden.
Wählen Sie im Menü Backup-Repository ein Backup-Repository aus den verfügbaren Optionen aus. Wenn keine Optionen verfügbar sind, müssen Sie ein Sicherungs-Repository erstellen.
Klicken Sie auf Weiter.
Definieren Sie im Feld Cron-String einen Zeitplan für diesen Sicherungsplan.
Geben Sie einen Ausdruck mit der Standard-Cron-Syntax ein. Der Ausdruck 10 3 * * * erstellt beispielsweise täglich um 0310 eine Sicherung. Alle Zeiten werden als UTC interpretiert. Das Mindestintervall zwischen geplanten Sicherungen beträgt 10 Minuten.
Optional: Legen Sie im Abschnitt Aufbewahrungsrichtlinie fest, ob Sicherungen nach einer bestimmten Anzahl von Tagen automatisch gelöscht werden sollen:
Klicken Sie das Kästchen Automatisches Löschen von Sicherungen aktivieren an.
Legen Sie im Feld Sicherungen löschennach die Anzahl der Tage fest, für die die Sicherung aufbewahrt werden soll. Wenn die Anzahl der Tage erreicht ist, wird die Sicherung automatisch gelöscht.
Klicken Sie auf Weiter.
Prüfen Sie die Details des Sicherungsplans. Klicken Sie auf Plan erstellen, um die Erstellung dieses Sicherungsplans abzuschließen.
INSTANCE_NAMESPACE: Der Namespace, der die Harbor-Instanz enthält. Der Sicherungsplan muss sich im selben Namespace wie die Harbor-Instanz befinden.
CRON_STRING: Der Cron-Wert, der den Sicherungszeitplan definiert. Der Wert 0 3 * * * definiert beispielsweise einen Zeitplan, der täglich um 3:00 Uhr Sicherungen erstellt. Mit dem Feld paused können Sie den Zeitplan pausieren. Bei „true“ werden regelmäßige geplante Sicherungen beendet. Auch wenn ein Sicherungsplan pausiert ist, können Sie weiterhin manuelle Sicherungen erstellen.
BACKUP_REPO_NAME: der Name des Sicherungs-Repositorys. Weitere Informationen finden Sie unter Sicherungsrepository erstellen.
BACKUP_RETAIN_DAYS: Die Anzahl der Tage, nach denen die Sicherung gelöscht wird. Dieser Wert wird durch manuelle Sicherungen überschrieben, die diesen Plan verwenden.
PLAN_DESCRIPTION: eine Textbeschreibung des Sicherungsplans.
[[["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)."],[[["\u003cp\u003eThis page guides you through creating backup plans for Harbor instances within Google Distributed Cloud (GDC) air-gapped environments.\u003c/p\u003e\n"],["\u003cp\u003eBackup plans define the schedule and retention policy for automatic backups of a specific Harbor instance, with a minimum interval of 10 minutes between backups.\u003c/p\u003e\n"],["\u003cp\u003eCreating a backup plan requires the Harbor Instance Admin and Secret Admin roles, as well as a pre-configured Harbor backup repository.\u003c/p\u003e\n"],["\u003cp\u003eYou can set up the backup plan via the GDC console by selecting the zone, Harbor instance, backup repository, and setting the desired schedule and retention period, or through the API using a YAML configuration file.\u003c/p\u003e\n"],["\u003cp\u003eAutomatic backup deletion can be enabled to remove backups after a set number of days, although this retention policy can be overridden by manual backups.\u003c/p\u003e\n"]]],[],null,["# Create a backup plan\n\nThis page provides instructions for how to create backup plans for Harbor\ninstances in Google Distributed Cloud (GDC) air-gapped.\n\nThe backup plan references the Harbor instance that is backed up. Backup plans\ndefine key components for backups such as the backup schedule and the retention\npolicy. GDC creates backups automatically depending on the configuration you\nprovide in the backup plan. You can also create a manual backup on demand, which\ninherits some values from the backup plan.\n\nBefore you begin\n----------------\n\nTo create a backup plan, you must have access to the following:\n\n- The necessary identity and access roles:\n\n - Harbor Instance Admin: has full access to manage Harbor instances in a project. Ask your Organization IAM Admin to grant you the Harbor Instance Admin (`harbor-instance-admin`) role.\n - Secret Admin: required for operating in the GDC console. Ask your Organization IAM Admin to grant you the Secret Admin (`secret-admin`) role.\n- A Harbor backup repository. For more information, see [Create a backup repository](/distributed-cloud/hosted/docs/latest/gdch/platform-application/pa-ao-operations/harbor-backup/create-backup-repository-harbor).\n\nCreate a backup plan\n--------------------\n\nCreate a repository in the GDC console or the API. \n\n### Console\n\n1. Sign in to the GDC console.\n2. In the navigation menu, click **Backup for harbor instance**.\n3. Click **Backup plans**.\n4. Click **Create backup plan**.\n5. In the **Zone** menu, select the zone.\n6. In the **Harbor instance source** menu, select the harbor instance this backup plan creates backups for.\n7. In the **Backup plan name** field, enter a name for the backup plan.\n8. Optional: In the **Backup plan description** field, enter a description to distinguish this backup plan from others\n9. In the **Backup repository** menu, select a backup repository from the available options. If there are no options available, you must [Create a\n backup repository](/distributed-cloud/hosted/docs/latest/gdch/platform-application/pa-ao-operations/harbor-backup/create-backup-repository-harbor).\n10. Click **Next**.\n11. In the **Cron string** field, define a schedule for this backup plan. Enter an expression using standard cron syntax. For example, the expression `10 3 * * *` creates a backup at `0310` every day. All times are interpreted as UTC. The minimum interval between scheduled backups is 10 minutes.\n12. Optional: In the **Retention policy** section, decide whether to\n automatically delete backups after a certain number of days:\n\n 1. Select the **Enable automatic backup deletion** checkbox.\n 2. In the **Delete backups** **after** field, set the number of days for which to retain the backup. Once the number of days is reached, the backup is automatically deleted.\n13. Click **Next**.\n\n14. Review the backup plan details. To finalize the creation of this backup\n plan, click **Create Plan**.\n\n### API\n\n apiVersion: artifactregistry.gdc.goog/v1\n kind: HarborInstanceBackupPlan\n metadata:\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eBACKUP_PLAN_NAME\u003c/span\u003e\u003c/var\u003e\n namespace: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eINSTANCE_NAMESPACE\u003c/span\u003e\u003c/var\u003e\n spec:\n backupSchedule:\n cronSchedule: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eCRON_STRING\u003c/span\u003e\u003c/var\u003e\n paused: false\n backupConfig:\n backupRepository: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eBACKUP_REPO_NAME\u003c/span\u003e\u003c/var\u003e\n backupScope:\n harborInstance: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eINSTANCE_NAME\u003c/span\u003e\u003c/var\u003e\n retentionPolicy:\n backupRetainDays: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eBACKUP_RETAIN_DAYS\u003c/span\u003e\u003c/var\u003e\n description: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003ePLAN_DESCRIPTION\u003c/span\u003e\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eBACKUP_PLAN_NAME\u003c/var\u003e: the name of the backup plan.\n- \u003cvar translate=\"no\"\u003eINSTANCE_NAMESPACE\u003c/var\u003e: the namespace containing the Harbor instance. The backup plan must be in the same namespace as the Harbor instance.\n- \u003cvar translate=\"no\"\u003eCRON_STRING\u003c/var\u003e: the cron value that defines the backup schedule. For example the value `0 3 * * *` defines a schedule that performs daily backups at 3 AM. Use the `paused` field to pause the schedule. If true, periodic scheduled backups are stopped. A paused backup plan is still able to create a manual backup.\n- \u003cvar translate=\"no\"\u003eBACKUP_REPO_NAME\u003c/var\u003e: the name of the backup repository. For more information, see [Create a backup repository](/distributed-cloud/hosted/docs/latest/gdch/platform-application/pa-ao-operations/harbor-backup/create-backup-repository-harbor).\n- \u003cvar translate=\"no\"\u003eINSTANCE_NAME\u003c/var\u003e: the name of the Harbor instance. For more information, see [Create Harbor registry instances](/distributed-cloud/hosted/docs/latest/gdch/platform-application/pa-ao-operations/create-harbor-instances).\n- \u003cvar translate=\"no\"\u003eBACKUP_RETAIN_DAYS\u003c/var\u003e: the number of days after which the backup is deleted. This value is overridden by manual backups that use this plan.\n- \u003cvar translate=\"no\"\u003ePLAN_DESCRIPTION\u003c/var\u003e: a text description of the backup plan.\n\nWhat's next\n-----------\n\n- [Manage a backup plan](/distributed-cloud/hosted/docs/latest/gdch/platform-application/pa-ao-operations/harbor-backup/manage-backup-plan-harbor)\n- [Create a manual backup](/distributed-cloud/hosted/docs/latest/gdch/platform-application/pa-ao-operations/harbor-backup/create-manual-backup-harbor)\n- [Create a restore](/distributed-cloud/hosted/docs/latest/gdch/platform-application/pa-ao-operations/harbor-backup/create-restore-harbor)"]]