This page provides instructions on how to create an on-demand manual backup of a Harbor instance in Google Distributed Cloud (GDC) air-gapped.
Manual 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.
Before you begin
To create a manual backup, you must have access to the following:
The necessary identity and access roles:
- 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. - Secret Admin: required for operating in the GDC console. Ask your Organization IAM Admin to grant you the Secret Admin (
secret-admin
) role.
- 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 (
An existing backup plan. The manual backup inherits the attributes of this backup plan. For more information, see Create a backup plan.
Create a manual backup
Create a manual backup in the GDC console or the API.
Console
- Sign in to the GDC console.
- In the navigation menu, click Backup for harbor instance.
- Click Backup plans.
- Click the name of the backup plan in the table for which to create the manual backup for.
Click
Start a backup.In the Backup name field, enter a name for the backup.
Optional: In the Backup description field, enter a description to distinguish this backup from others.
Optional: To automatically delete backups after a certain number of days, follow these steps:
- Select the Enable automatic backup deletion checkbox.
- 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.
Click Create. The backup appears in the backup table.
API
apiVersion: artifactregistry.gdc.goog/v1
kind: HarborInstanceBackup
metadata:
name: BACKUP_NAME
namespace: INSTANCE_NAMESPACE
spec:
backupPlanName: BACKUP_PLAN_NAME
manual: true
retainDays: RETAIN_DAYS
description: BACKUP_DESCPRITON
Replace the following:
BACKUP_NAME
: the name of the backup being created.INSTANCE_NAMESPACE
: the namespace containing the Harbor instance. The backup must be in the same namespace as the Harbor instance.BACKUP_PLAN_NAME
: 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.RETAIN_DAYS
: 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 plan.BACKUP_DESCPRITON
: a text description of the backup.