Skip to main content
Version: 2.8

Create backups with advanced filters

Portworx Backup now provides advanced filtering namespaces to be included or excluded to the backup operation to support more flexible selection of namespaces. This feature allows users to narrow-down or refine the number of namespaces for the backup operation from a huge list. It helps users tailor backup jobs more precisely by quickly selecting the subsets of namespaces with the combination of namespace and resource labels.

Prerequisites

  • Stork version must be at least 25.2.1 for advanced filters. If you are on an older version, use the key=value or key:value format to filter namespaces by labels.

  • Make sure that the required labels are applied to the namespaces either through web console or through CLI. For more information on labeling guidelines, refer to Kubernetes labels and selectors.

You can now create manual or scheduled backups with the same label-based selection flexibility:

  • Users can now create a manual or scheduled backup of:
    • Namespaces that have a particular label with Include (in) option. Example: app = nginx
    • Namespaces that do not have a particular label with Exclude (notin) option. Example: tier notin (front-end)
    • All the resources from the list of namespaces that have a particular set of labels with Include (in) option. Example: region in (us-east-01)
    • All the resources from the list of namespaces that do not have a particular set of labels with Exclude (notin) option. Example: !deprecated

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 namespaces with precision.

Back up namespaces by labels

To back up a namespace with specific labels:

  1. From the home page, click Clusters icon in the left navigation pane.

  2. On the Clusters page, select the cluster that contains the namespace(s) you want to back up.

  3. To create backups, navigate to the Backups tab and use the NS tab to back up namespaces.

  4. Select the required namespace(s) to be backed up.

    1. If the namespace list is huge, you can search the required namespaces using search option
    2. You can select the required resources from All resources drop-down.
    3. You can filter the required namespaces and the namespace resources with the labels
  5. After selecting the required namespaces and/or their resources to be backed up, click Backup.

  6. In the Create Backup window, specify the following fields, refer Create a backup for more information on these fields.

  • Enter name for Backup: provide a relevant name for your backup

  • Backup location: choose the required backup location (you have added previously) from the drop-down

  • Cross Cloud Backup/Restore: you can enable or disable this option

    • Snapshot Class Mapping: facilitates mapping of your storage provisioner with volume snapshot class

      • CSI Provisioner: lists the CSI provisioners associated with the PVCs present in the namespaces selected for the backup

      • Volume snapshot class: lists all the volume snapshot class (vsc) resources along with default vsc

      • Offload CSI snapshots to backup location: offloads the CSI snapshot to the specified backup location

    • Backup type: allows you to choose the type of backup required (manual or scheduled backup)

      • On a schedule: disable this option to create a one-time manual backup
    • Pre-exec rule: select a rule from the drop drown to execute before the backup is created

    • Post-exec rule: select a post rule you want to execute after the backup is created

    • Backup Labels: any labels that you want to add to the backup you are going to create

    • NAMESPACES LIST: lists all the namespaces selected for backup creation

  1. Click Create.

    PXB creates a backup of selected namespaces/VMs with or without specific labels based on the options you have selected in the filters at the time of backup creation.