Back up VMs with advanced filters
Portworx Backup now supports more flexible backup selection by allowing users to include or exclude VMs and their resources based on the labels. This feature applies to both manual and scheduled backups and helps users to quickly pick the required VMs and their resources for the backup operation.
You can now create manual backups of VMs and their resources with the same label-based selection flexibility:
- Users can now create a manual or scheduled backup of:
- VMs that have a particular label with
Include
(in) option - All the resources from the list of VMs that have a particular set of labels with
Include
(in) option - VMs that do not have a particular label with
Exclude
(notin) option - All the resources from the list of VMs that do not have a particular set of labels with
Exclude
(notin) option
- VMs that have a particular label with
This label-based filtering provides fine-grained control over what gets backed up, making backup configuration more aligned with your organization’s tagging strategy. Whether through scheduled automation or manual action, you can now include or exclude resources with precision.
Prerequisites
-
Stork version must be at least 25.2.1 for advanced filters.
noteIf you are on an older version, use the
key=value
orkey:value
format to filter VMs by labels. -
Make sure that the required labels are applied to the VMs either through web console or through CLI. For more information on labeling guidelines, refer to Kubernetes labels and selectors.
Back up VMs by labels
Prerequisites
- Make sure that the required labels are applied to the VMs and their resources
To take a backup of VMs and their resources with specific labels:
-
From the home page, click Clusters icon in the left navigation pane.
-
On the Clusters page, select the cluster that contains VMs you want to back up.
-
To create backup of required VMs, navigate to Application tab and then VM tab.

-
Select the required VMs to be backed up.
- Search by VM name: if the VM list is huge, you can search the required VMs using search option
- Filter by namespace: you can filter the VMs contained inside a specific namespace with this filter
- Filter by OS: you can filter the VMs inside chosen operating system from this drop-down
- Filter by labels: this filter offers advanced capabilities to select VMs based on namespace labels, VM labels, or a combination of both
- Filter by namespace label: you can filter the VMs under namespaces with or without specific labels using include or exclude option
- Filter by VM labels: you can filter the VMs with or without specific labels or VMs without specific labels using include or exclude tags with this option
-
After selecting the required VMs and the resources to be backed up, click Backup.
-
In the Create Backup window, specify the below fields. Refer Create a backup for more information on these fields.
-
Enter name for Backup: the name of the backup you want to be displayed in the Portworx Backup web console
-
Backup location: the S3 bucket or NFS backup location you want to store your backups onto
-
Cross-cloud Backup/Restore: this toggle button is disabled by default for VM backups, because Portworx Backup currently does not support cross-cloud (with KDMP driver) backups and restores for VM-based backups.
-
Snapshot Class Mapping: this option is always enabled for VM backups and allows you to map the snapshot class for your backup. You can map a snapshot class only for non-Portworx provisioners (CSI provisioners).
- Offload CSI snapshots to backup location: offloads snapshots to any S3-based or NFS backup location
-
Backup Type: manual or scheduled
- Disable: creates a backup immediately, it is manual way of creating backups
- Enable: automates the creation of backup process and creates the backup at the scheduled time
-
Choose a Schedule Policy: when you select all VMs of the cluster to take a backup and choose a schedule policy, you will see the following options:
- Include future vms in selected namespaces: adds the future VMs that will be created or added in future for the selected namespaces of the scheduled backup
- Allow parallel backup: select this option to enable PXB to trigger a new scheduled backup even when the previous scheduled backup is still in progress (uploading snapshots to the cloud). Refer to Parallel backup schedules for more information.
-
Custom Rules
-
Disable: Portworx Backup runs default or built-in freeze/thaw rule, does not require the user to create rules manually
-
Enable: allows you to select the custom (user-defined) pre-exec and post-exec rule (freeze/thaw rule). If you enable and do not select any rules, Portworx Backup creates backup without applying any rule.
-
Pre-exec rule: choose the custom pre-exec rule from the drop-down
-
Post-exec rule: choose the custom post-exec rule from the drop-down
-
-
Backup Labels: apply the label(s) in key=value or key:value format to your backup to filter the required backups when needed at a later point in time
-
LIST OF VM(s): lists out the selected VMs and creates a backup
Portworx Backup creates a backup of your entire VM. To view the backup you just created, navigate to the Backups > VM tab from your application cluster page.