By default, when Velero attempts to create a resource during a restore, the resource which gets restored is compared to the existing resources on the target cluster. If the resource already exists in the target cluster, Velero skips restoring the current resource and moves to the next resource to restore, without making any changes to the target cluster. For more information about Restore existing resource policy, see Restore existing resource policy.

You can change this policy for a restore by using the --existing-resource-policy restore flag. The available options are none (default) and update. If you choose to update existing resources during a restore (--existing-resource-policy=update), Velero will attempt to update an existing resource to match the resource from the backup.

Procedure

  1. Log in to the VMware Telco Cloud Automation web interface.
  2. Navigate to Infrastructure > Virtual Infrastructure.
  3. Open the web terminal by clicking the Options (three dots) corresponding to the workload cluster where you wish to restore and then select Open Terminal.
  4. On the Web terminal, check the service health of Velero by running the following command:
    # kubectl get pod -n velero
    # kubectl get bsl -n velero
  5. Get the backup information by running the following command.
    # velero backup get
  6. Restore the the Custom k8s resources (CRD, ValidatingWebhookConfiguration, and ingressclass) which are backed up using label selector.
    velero restore create --from-backup <harbor-cluster-resources-backup>        
          OR
    velero restore create --from-backup <harbor-cluster-resources-backup> --existing-resource-policy=update
    
    # existing-resource-policy=update : This flag instructs Velero to update existing resources in the cluster with the values from the backup if there are any differences or conflicts during the restore process.
  7. Restore all the resources from the backup created for harbor namespace.
    # velero restore create --from-backup <harbor-namespaces-backup>
  8. Check restore status and wait until all backup processes are "Completed"
    # velero restore get
  9. If Velero restore get status is PartiallyFailed then delete the restore and try again.
    # velero restore get --> it will fetch the status of all the restore
    # velero delete restore <<restore-name>>
    Note:
    • Ensure S3 object storage has sufficient space to perform Backup. If sufficient space is not available Backup operation will fail

    • After Restore operations validate all the Harbor components are up and running. For details about post intallation checks and configurations, see Harbor post installation checks and configurations.

    • You might encounter following intermittent issues during restore operation:

      • Restore operation status is partially failed:

        • Workaround - Delete the restore and recreate again.

    • For some Upstream Harbor Backup and restore limitations, see Backup And Restore Harbor With Velero.