Use Tanzu Mission Control to create backups of specified data resources in your cluster.
Using Tanzu Mission Control, you can back up an entire cluster or a subset of the data resources it contains. For more information, see Data Protection in VMware Tanzu Mission Control Concepts.
Prerequisites
To perform a backup, you must first create a target location, as described in Create a Target Location for Data Protection and associate it with the cluster or cluster group that contains your cluster.
Prepare the cluster, as described in Enable Data Protection for a Cluster.
If you want to back up persistent volumes using CSI snapshot, make sure your cluster satisfies the CSI snapshot prerequsites described in Data Protection in VMware Tanzu Mission Control Concepts.
Make sure you have the appropriate permissions.
- To perform 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 that you want to back up.
- Click the Data Protection tab.
- On the Data Protection tab, under Backups, click the Create Backup button.
You can also initiate a backup by clicking the
Create Backup link in the Data Protection box on the Overview tab of the cluster detail page.
- Specify the scope of the backup, and then click Next.
- the entire cluster
- selected namespaces
- resources identified by a label selector
- You can optionally choose to include or exclude specific resources and exclude namespaces.
- Click Advanced options.
- Exclude Cluster -scoped resources: Specify cluster-scoped resources that you want to exclude from the backup.
- Exclude Namespace-scoped resources: Specify a list of resource types that will not be included in the backup.
- Excluded namespaces: Specify a list of namespaces that will not be included in the backup. As a consequence, any namespaces in the cluster not in this list will be backed up. This option is not available for selected namespaces backups.
- Include cluster-scoped resources: Select specific cluster-scoped resources that you want to include in the backup. By default, cluster-scoped resources are backed up if you opt to backup the entire cluster or to backup resources identified by a label selector.
- Select the volume backup method, either FSB or CSI.
By default all volumes are backed up using FSB. You can optionally select between opt-in and opt-out. For more information about these options, see Data Protection in VMware Tanzu Mission Control Concepts.
Select Use CSI snapshot backup for any excluded and remaining volumes if you want to take CSI snapshots of remaining volumes. For information about CSI requirements, see Requirements for CSI Volume Backup.
For more information about how FSB and CSI work, see the section on FSB and CSI usage in Data Protection in VMware Tanzu Mission Control Concepts.
- Choose a target location, and then click Next.
When
All locations is selected, the dropdown list shows all target locations that have been defined for your organization. Select
Currently available locations to show only the target locations that are immediately accessible from
Tanzu Mission Control, and not those that might be temporarily unaccessible.
- Optionally, you can define backup pre- and post-hooks by expanding the Backup Hooks section and defining the hooks. For more information about hooks, see About Backup and Restore Hooks and Backup and Restore Hook Examples.
- Click Add a Backup hook to add a hook.
- Define the hook by naming it, and then specifying namespaces and/or label selector by defining the key, operator, and value. The hook will be applied to the pods based on specified namespace and/or label selector.
- Next, select Add a pre-hook and/or Add a post-hook. You must provide at least one hook.
- Enter a container name, optionally.
- Provide the command in the command text box.
- Select the Command time-out and On Error settings.
- Specify the schedule for the backup, and then click Next.
You can choose
Now to queue the backup immediately upon completion of this workflow, or choose one of the recurring schedule formats and provide a targeted start time. You can also choose
Custom, and provide a cron expression to specify the schedule for your backup.
Note: You can have a maximum of 720 backups per backup schedule at any given point in time. This capacity is influenced by both the frequency and the retention period of the backup schedule. Therefore, if your schedule requires a high frequency then you might need to reduce the retention period.
Note: The
Now option is not available when scheduling cluster group backups.
- Specify how long to retain the backup, and then click Next.
You can specify any number of days, up to 365.
- Provide a name for the backup.
The name that you provide can consist of lowercase letters, numbers, and hyphens.
- Click Backup.
Results
When you click Backup, Tanzu Mission Control schedules the process of backing up the resources you have specified, and then returns you to the cluster detail page, which shows you the status of the backup operation.