Use Tanzu Mission Control to restore the contents of a backup of data resources from your cluster.
Using Tanzu Mission Control, you can restore the results of a backup operation that might include an entire cluster or a subset of the data resources it contains.
Prerequisites
This procedure assumes that have a cluster on which you have already performed at least one backup operation.
Make sure you have the appropriate permissions.
- To restore a backup, you must be associated with the cluster.admin role in the cluster.
Procedure
- Log in to the Tanzu Mission Control console, and then navigate to the cluster detail page for the cluster.
- Click the Data Protection tab.
- On the Data Protection tab, in the Backups list, select the backup that you want to restore, and then click Restore.
- Specify what you want to restore from the selected backup.
- the entire backup
- selected namespaces
- resources identified by a label selector
- If you choose to restore selected namespaces, you can optionally modify the target namespace to which you want to restore.
- Select the namespace you want to restore.
- Click the name of the target namespace.
- In the Select target namespace dialog, select the namespace to which you want to restore. You can optionally create a new namespace by entering a name for it.
The name you provide can consist of lowercase letters, numbers, and hyphens.
- Click Confirm.
- You can also specify a list of namespaces that will not be included in the restore. As a consequence, any namespaces in the backup that are not in this list will be restored.
- You can optionally choose to include or exclude specific resources and to exclude namespaces.
- Click Advanced options.
- Enter the name of the resource you want to exclude, and then click Add. Repeat this step to exclude multiple resources.
Note: TKG clusters come with Antrea installed, which includes a webhook that prevents certain Antrea-related resources from being updated. This may cause the overall restore to complete with a partially failed status. This can be avoided by configuring the restore to exclude the problematic resources
tiers.crd.antrea.io
and
tiers.security.antrea.tanzu.vmware.com
.
- You can opt to select Include cluster-scoped resources. If set, cluster-scoped (i.e., non-namespaced) resources, such as
CustomResourceDefinition
and ClusterRoles
, will be restored if the backup has cluster-scoped resources captured. By default, cluster-scoped resources are restored if you opt to restore the entire backup or resources identified by a label selector option.
- You can also select Update existing resource. If this is set, resources on the cluster will be overwritten (via patch) by the corresponding resources present in the backup (if they exist). By default, an existing resource in the cluster will not be modified even if it differs from its counterpart in the backup.
- You can optionally Exclude namespaces. Specify a list of namespaces that will not be included in the restore. This option is not available when restoring selected namespaces.
- Click Next.
- Provide a name for the restored backup.
The name you provide can consist of lowercase letters, numbers, and hyphens.
- Click Restore.