This page contains instructions for how to restore a Harbor instance backup in Google Distributed Cloud (GDC) air-gapped.
Restores require an existing backup to function. The restore uses the specified backup data for the restoration. A restore only supports restoring a Harbor instance that has the same reference as the backup. The original Harbor instance must be deleted before restoration starts.
Before you begin
You must have an existing backup. You create backups by doing one of the following:
- Automatically: schedule automatic backups using a backup plan. For more information, see Create a backup plan.
- Manually: create manual backups on demand. For more information, see Create a manual backup.
Required IAM roles
Request the necessary permissions from your Project IAM administrator. Enforce least privilege access by requesting only the roles required for your specific tasks.
- Secret Admin (
secret-admin): get, list, create, update, patch, and delete all Kubernetes secrets within the project namespace. This is a project-level permission that includes the sensitive authentication credentials needed by the backup repository. - Harbor Instance Admin (
harbor-instance-admin): get, list, watch, create, update, patch, and delete Harbor instances, backup repositories, backup plans, backups, and restores within a specific project namespace.
Create a restore
Create a restore in the GDC console or the API.
Console
- Sign in to the GDC console.
- In the navigation menu, click Backup for harbor instance.
- Click Backups.
- Click the name of the backup you want to restore.
- Click Restore a backup
API
apiVersion: artifactregistry.gdc.goog/v1
kind: HarborInstanceRestore
metadata:
name: RESTORE_NAME
namespace: INSTANCE_NAMESPACE
spec:
backupName: BACKUP_NAME
description: RESTORE_DESCRIPTION
Replace the following:
RESTORE_NAME: the name of the restore.INSTANCE_NAMESPACE: the namespace containing the Harbor instance. The backup plan containing the backup to restore must be in the same namespace with the Harbor instance to restore.BACKUP_NAME: the name of the backup that the system restores.RESTORE_DESCRIPTION: a text description of the restore being created.