Skip to main content
Version: 3.0

Create Backups with Advanced Filters

Applicable to both Classic and Federated modes

Portworx Backup provides advanced filtering to include or exclude Namespaces in a backup operation, supporting more flexible Namespace selection. This feature allows you to narrow down or refine the number of Namespaces for a backup operation from a large list. It helps you tailor backup jobs more precisely by quickly selecting subsets of Namespaces using a 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 the web console or the CLI. For more information on labeling guidelines, see Kubernetes labels and selectors.

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

  • You can create a manual or scheduled backup of:
    • Namespaces that have a particular label using the Include (in) option. Example: app = nginx
    • Namespaces that do not have a particular label using the Exclude (notin) option. Example: tier notin (front-end)
    • All resources from the list of Namespaces that have a particular set of labels using the Include (in) option. Example: region in (us-east-01)
    • All resources from the list of Namespaces that do not have a particular set of labels using the 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 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 the Clusters icon in the left navigation pane.

  2. On the Clusters page, select the cluster that contains the Namespace or Namespaces you want to back up.

  3. Navigate to the Backups tab and use the NS tab to back up Namespaces.

  4. Select the required Namespaces to back up.

    1. If the Namespace list is long, you can search for the required Namespaces using the search option.
    2. You can select the required resources from the All resources drop-down.
    3. You can filter the required Namespaces and Namespace resources by labels.
  5. After selecting the required Namespaces and their resources to back up, click Backup.

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

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

  • Backup location: choose the backup location you previously added 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 the 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-down 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.

    Portworx Backup creates a backup of the selected Namespaces or VMs with or without specific labels based on the filter options you selected at the time of backup creation.

    You can modify these Namespace labels only when your backup type is a scheduled backup. For more information, see Manage Labels.