Skip to main content
Version: 2.9

Back up volume resources

Overview

Portworx Backup supports Volume Resource-Only Policy (VROP), which allows users to back up only the Kubernetes PVC/PV specifications or volume resources without including the volume data.

With this functionality, users can create flexible rules (or generic policies) that determine which volumes should be excluded from data backup. Instead of manually specifying each volume to skip, the policy can use patterns or conditions (such as volume labels, names, namespaces, or other metadata) to automatically filter out those volumes. This helps optimize backup jobs by:

  • Reducing unnecessary data storage

  • Improving backup performance

  • Avoiding backup of non-critical or transient volumes.

This is ideal in scenarios where:

  • Volume data is protected externally (for example, cloud-native snapshots or NFS backups).

  • Users want to avoid unnecessary duplication of volume data.

  • Existing volumes will be reused during restore.

    note
    • This feature is currently supported for the following cluster types:
      • OpenShift (OCP) with Portworx Enterprise
      • Anthos
    • Feature is available through the REST API and Ansible, with UI support planned in the upcoming releases.

Supported volume types

You can exclude following types of volumes from being backed up with this feature:

Volume TypeFiltering KeyExample
Portworx volumesvolume_typeportworx
CSI volumescsi_driverpxd.portworx.com
NFS volumesnfs_servernfs.mycompany.com:/nfs-share

Example scenario

Consider a use case where a Kubernetes namespace contains both statically provisioned NFS volumes and Portworx volumes. With this feature, the user can define a generic volume filter policy that identifies NFS volumes—based on attributes such as volume provisioner, labels, or volume name patterns and configure the backup job to skip volume data for those matching volumes.

This allows the backup process to:

  • Include Portworx volumes (for example, provisioned by pxd.portworx.com)

  • Exclude NFS volumes (for example, provisioned statically or using the cluster.local/nfs-subdir-external-provisioner)

  • Avoid unnecessary backup of shared or external data already backed up elsewhere.

When to use

  • Cluster upgrade or re-deployment: restore only volume specs and rebind to existing volumes.
  • NFS volumes: skip data backup for static NFS volumes managed outside of Portworx Backup.

How it works

You create a VolumeResourceOnlyPolicy (VROP) object that specifies which volume types or CSI drivers to skip. This object is then referenced in a backup or backup schedule.

  1. Create a VolumeResourceOnlyPolicy. You can create a VROP object using Ansible or through the px-backup REST API.

    Sample YAML

    apiVersion: stork.libopenstorage.org/v1alpha1
    kind: VolumeResourceOnlyPolicy
    metadata:
    name: skip-nfs-policy
    spec:
    volumeTypes:
    - nfs
    nfsServers:
    - nfs.mycompany.com:/nfs-share
  2. Attach the policy to a backup or backup schedule:

    Backup Request Example (REST API)

    {
    "name": "backup-without-nfs",
    "namespace": "app-namespace",
    "volume_resource_only_policy_ref": {
    "name": "skip-nfs-policy",
    "orgId": "org-id"
    }
    }

    Backup schedule update example

    PXB enforces the VolumeResourceOnlyPolicy beginning with the next backup cycle.

note

PXB will be supporting Duplicate or Retry mechanism of volume resource-only backups in the upcoming release.

Restore behavior

  • PVC/PV specs for skipped volumes are restored.
  • Volume data is not restored.
  • Kubernetes attempts to rebind PVCs to pre-existing volumes.

Best practices

  • Ensure skipped volumes are already present and intact before restoring.
  • Test your VROP setup in a staging environment before using it in production.
  • Use meaningful names for your VROP objects for better management and traceability.

Limitations

  • Feature is not available via the Portworx Backup web console for 2.9.0.
  • Cannot filter by StorageClass or volume size.
  • PXE namespace cannot be restored with this feature.
  • Custom RBAC roles are not supported for managing VROPs.

FAQs

Q: Can I skip data for only some volumes in a namespace?
A: Yes. You can define filters (e.g., volume_type: nfs) to selectively skip volume data while including others.

Q: What happens if the skipped volume doesn’t exist during restore?
A: The PVC/PV spec is restored, but the volume will fail to bind unless it already exists or is recreated manually.

Q: Can I add a VROP to an existing schedule?
A: Yes. Once added, the policy will take effect from the next scheduled backup.