Skip to main content
Version: 3.1

Back up on NFS Shares

Applicable to Classic mode only

note

NFS backup is not available in Federated mode. Federated mode supports object store backup locations only.

Portworx Backup allows you to add Network File System (NFS) shares as a backup target. This feature lets you leverage your existing NFS storage infrastructure to back up and restore your application data. Portworx Backup supports NFS backup locations based on NFSv4.

NFS server prerequisites

  • Ensure that read and write permissions are enabled for the required NFS shares for Portworx Backup to reach those shares.
  • Make sure that TCP port 2049 is open for Portworx Backup to communicate with the NFS server. NFSv4 (which Portworx Backup uses) requires only TCP port 2049 and does not need the ancillary rpcbind, mountd, and statd ports that NFSv3 requires. If your environment also serves NFSv3, ensure those additional ports are open as well.
  • Ensure that the NFS backup location is already added and configured in Portworx Backup before you create a backup. For instructions, see NFS Backup Locations.

Configure the NFS server

On NFS share for granting access to non-root user:

  1. Create a non-root user in the NFS server if the user does not exist.

  2. Update /etc/exports configuration file on the NFS server:

    <export path> <allowed_host(s)>(<comma separated mount options>)

    Example:

    /mnt/nfsshare xx.xx.xx.xx(all_squash,anonuid=1001,anongid=1001,rw,sync)

    Where 1001 is the user ID of the non-root user created in step 1.

  3. Provide the ownership to the non-root user:

    chown -R <UID>:<GID> <NFS share/mount_path>

    Example:

    chown -R 1001:1001 /mnt/nfsshare
  4. Export the directories defined in /etc/exports to NFS clients, then restart the NFS server so the changes take effect:

    sudo exportfs -ra
    sudo systemctl restart <daemon_name>

    Where:

    • sudo exportfs -ra re-exports all directories listed in /etc/exports, applying the configuration you added in the previous steps.
    • sudo systemctl restart <daemon_name> restarts the NFS server so the updated exports are served.

    The NFS server service name (<daemon_name>) varies by distribution:

    DistributionService name
    RHEL, CentOS, Rocky Linux, Fedoranfs-server
    Debian, Ubuntunfs-kernel-server

    To confirm the exact service name on your system, run systemctl list-units | grep nfs.

Create NFS backup

To create a backup on NFS share as the backup location:

  1. Log in to the Portworx Backup web console.

  2. From the home page, click the Clusters icon in the left navigation bar.

  3. Navigate to the application cluster to create a backup of the required application(s).

  4. In the cluster’s Applications tab, select the application(s) you want to back up and then click Backup:

  5. In the Create Backup window, specify the required fields.

    In the Backup location field, search for and select the NFS share backup location, then click Create.

    note

    The Backup location field displays only successfully validated NFS backup locations. Enter a keyword to filter the list by name.

    note

    NFS-based backup location supports generic, manual, and scheduled backups.

  6. Verify that the backup completed successfully:

    After you click Create, the new backup appears in the Backups tab of the application cluster page. Monitor the backup's status in this tab until it reaches Success. The procedure is complete only after the status is confirmed as Success. If the status shows Failed, review the backup details to troubleshoot the issue.

    For more information on creating a backup, see Create a Backup.

In this topic: