Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Cette page explique comment créer des plans de sauvegarde pour les instances Harbor dans Google Distributed Cloud (GDC) air-gapped.
Le plan de sauvegarde fait référence à l'instance Harbor sauvegardée. Les plans de sauvegarde définissent les composants clés des sauvegardes, tels que le calendrier de sauvegarde et la règle de conservation. GDC crée automatiquement des sauvegardes en fonction de la configuration que vous fournissez dans le plan de sauvegarde. Vous pouvez également créer une sauvegarde manuelle à la demande, qui hérite de certaines valeurs du plan de sauvegarde.
Avant de commencer
Pour créer un plan de sauvegarde, vous devez avoir accès aux éléments suivants :
Rôles d'identité et d'accès nécessaires :
Administrateur d'instance Harbor : dispose d'un accès complet pour gérer les instances Harbor d'un projet. Demandez à votre administrateur IAM de l'organisation de vous attribuer le rôle Administrateur d'instance Harbor (harbor-instance-admin).
Administrateur secret : rôle requis pour utiliser la console GDC. Demandez à l'administrateur IAM de votre organisation de vous attribuer le rôle Administrateur Secret (secret-admin).
Dans le menu de navigation, cliquez sur Sauvegarde pour l'instance Harbor.
Cliquez sur Plans de sauvegarde.
Cliquez sur Créer un plan de sauvegarde.
Dans le menu Zone, sélectionnez la zone.
Dans le menu Source de l'instance Harbor, sélectionnez l'instance Harbor pour laquelle ce plan de sauvegarde crée des sauvegardes.
Dans le champ Nom du plan de sauvegarde, saisissez un nom pour le plan de sauvegarde.
Facultatif : Dans le champ Description du plan de sauvegarde, saisissez une description pour distinguer ce plan de sauvegarde des autres.
Dans le menu Dépôt de sauvegarde, sélectionnez un dépôt de sauvegarde parmi les options disponibles. Si aucune option n'est disponible, vous devez créer un dépôt de sauvegarde.
Cliquez sur Suivant.
Dans le champ Chaîne Cron, définissez une planification pour ce plan de sauvegarde.
Saisissez une expression à l'aide de la syntaxe Cron standard. Par exemple, l'expression 10 3 * * * crée une sauvegarde à 0310 tous les jours. Toutes les heures sont interprétées par rapport au fuseau horaire UTC. L'intervalle minimal entre les sauvegardes planifiées est de 10 minutes.
Facultatif : Dans la section Règle de conservation, décidez si vous souhaitez supprimer automatiquement les sauvegardes après un certain nombre de jours :
Cochez la case Activer la suppression automatique des sauvegardes.
Dans le champ Supprimer les sauvegardesaprès, définissez le nombre de jours pendant lesquels conserver la sauvegarde. Une fois le nombre de jours écoulé, la sauvegarde est automatiquement supprimée.
Cliquez sur Suivant.
Vérifiez les informations du plan de sauvegarde. Pour finaliser la création de ce plan de sauvegarde, cliquez sur Créer un plan.
INSTANCE_NAMESPACE : espace de noms contenant l'instance Harbor. Le plan de sauvegarde doit se trouver dans le même espace de noms que l'instance Harbor.
CRON_STRING : valeur cron qui définit la programmation des sauvegardes. Par exemple, la valeur 0 3 * * * définit une programmation qui effectue des sauvegardes quotidiennes à 3h du matin. Utilisez le champ paused pour suspendre la programmation. Si la valeur est "true", les sauvegardes périodiques planifiées sont arrêtées. Un plan de sauvegarde suspendu peut toujours créer une sauvegarde manuelle.
BACKUP_RETAIN_DAYS : nombre de jours au terme desquels la sauvegarde est supprimée. Cette valeur est remplacée par les sauvegardes manuelles qui utilisent ce forfait.
PLAN_DESCRIPTION : description textuelle du plan de sauvegarde.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 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)"]]