Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Cette page explique comment créer une sauvegarde manuelle à la demande d'une instance Harbor dans Google Distributed Cloud (GDC) air-gapped.
Les sauvegardes manuelles créent une sauvegarde d'une instance Harbor à un moment précis. Vous pouvez créer des sauvegardes manuelles en dehors du calendrier défini par un plan de sauvegarde. Toutefois, vous devez créer un plan de sauvegarde pour créer une sauvegarde manuelle, car les sauvegardes manuelles héritent des attributs des plans de sauvegarde.
Avant de commencer
Pour créer une sauvegarde manuelle, 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).
Un plan de sauvegarde existant. La sauvegarde manuelle hérite des attributs de ce plan de sauvegarde. Pour en savoir plus, consultez Créer un plan de sauvegarde.
Créer une sauvegarde manuelle
Créez une sauvegarde manuelle dans la console GDC ou l'API.
Console
Connectez-vous à la console GDC.
Dans le menu de navigation, cliquez sur Sauvegarde pour l'instance Harbor.
Cliquez sur Plans de sauvegarde.
Dans le tableau, cliquez sur le nom du plan de sauvegarde pour lequel vous souhaitez créer la sauvegarde manuelle.
Cliquez sur saveDémarrer une sauvegarde.
Dans le champ Nom de la sauvegarde, saisissez un nom pour la sauvegarde.
Facultatif : Dans le champ Description de la sauvegarde, saisissez une description pour distinguer cette sauvegarde des autres.
Facultatif : Pour 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 Créer. La sauvegarde s'affiche dans le tableau des sauvegardes.
BACKUP_NAME : nom de la sauvegarde en cours de création.
INSTANCE_NAMESPACE : espace de noms contenant l'instance Harbor. La sauvegarde doit se trouver dans le même espace de noms que l'instance Harbor.
BACKUP_PLAN_NAME : référence du plan de sauvegarde. La configuration de sauvegarde est héritée du plan de sauvegarde, y compris le dépôt de sauvegarde à stocker et l'instance Harbor à sauvegarder.
RETAIN_DAYS : nombre de jours pendant lesquels les sauvegardes sont conservées dans le dépôt de sauvegardes. La règle de conservation du plan de sauvegarde est remplacée. Pour en savoir plus, consultez Créer un plan de sauvegarde.
BACKUP_DESCPRITON : description textuelle de la 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 guide outlines the process for creating an on-demand manual backup of a Harbor instance within Google Distributed Cloud (GDC) air-gapped environments.\u003c/p\u003e\n"],["\u003cp\u003eManual backups capture the state of a Harbor instance at a specific time, but require a pre-existing backup plan from which they inherit their attributes.\u003c/p\u003e\n"],["\u003cp\u003eYou need the Harbor Instance Admin and Secret Admin roles to create manual backups.\u003c/p\u003e\n"],["\u003cp\u003eManual backups can be initiated via the GDC console or the API, with options to set a custom name, description, and automatic deletion policy.\u003c/p\u003e\n"],["\u003cp\u003eDuring the backup creation process, the Harbor instance is temporarily set to read-only mode, preventing new artifacts from being pushed to the repository.\u003c/p\u003e\n"]]],[],null,["# Create a manual backup\n\nThis page provides instructions on how to create an on-demand manual backup of a Harbor instance in Google Distributed Cloud (GDC) air-gapped.\n\nManual backups create a backup of a Harbor instance at a specific point in time. You can create manual backups outside of the schedule defined by a backup plan. However, you must create a backup plan to create a manual backup, as manual backups inherit attributes from backup plans.\n\nBefore you begin\n----------------\n\nTo create a manual backup, 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- An existing backup plan. The manual backup inherits the attributes of\n this backup plan. For more information, see\n [Create a backup plan](/distributed-cloud/hosted/docs/latest/gdch/platform-application/pa-ao-operations/harbor-backup/create-backup-plan-harbor).\n\nCreate a manual backup\n----------------------\n\nCreate a manual backup 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 the name of the backup plan in the table for which to create the manual backup for.\n5. Click save**Start a backup**.\n\n | **Note:** During the backup process, the Harbor instance is temporarily switched to read-only mode. In read-only mode, the instance can't push new artifacts to the repository.\n6. In the **Backup name** field, enter a name for the backup.\n\n7. Optional: In the **Backup description** field, enter a description to\n distinguish this backup from others.\n\n8. Optional: To automatically delete backups after a certain number of\n days, follow these steps:\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.\n9. Click **Create**. The backup appears in the backup table.\n\n### API\n\n apiVersion: artifactregistry.gdc.goog/v1\n kind: HarborInstanceBackup\n metadata:\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eBACKUP_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 backupPlanName: \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 manual: true\n retainDays: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eRETAIN_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\"\u003eBACKUP_DESCPRITON\u003c/span\u003e\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eBACKUP_NAME\u003c/var\u003e: the name of the backup being created.\n- \u003cvar translate=\"no\"\u003eINSTANCE_NAMESPACE\u003c/var\u003e: the namespace containing the Harbor instance. The backup must be in the same namespace as the Harbor instance.\n- \u003cvar translate=\"no\"\u003eBACKUP_PLAN_NAME\u003c/var\u003e: the reference for the backup plan. The backup configuration is inherited from the backup plan, including the backup repository to store and which Harbor Instance to backup.\n- \u003cvar translate=\"no\"\u003eRETAIN_DAYS\u003c/var\u003e: the number of days the backups persist in the backup repository for. The retention policy in the backup plan is overridden. For more information, [Create a backup\n plan](/distributed-cloud/hosted/docs/latest/gdch/platform-application/pa-ao-operations/harbor-backup/create-backup-plan-harbor).\n- \u003cvar translate=\"no\"\u003eBACKUP_DESCPRITON\u003c/var\u003e: a text description of the backup.\n\nWhat's next\n-----------\n\n- [Manage a backup](/distributed-cloud/hosted/docs/latest/gdch/platform-application/pa-ao-operations/harbor-backup/manage-backup-harbor)"]]