The Ops Community ⚙️

Joseph D. Marhee
Joseph D. Marhee

Posted on

Rancher Backups with NFS-backed PersistentVolume


An external NFS provisioner is required to use an NFS mount as a PersistentVolume backing. This example uses the nfs-subdir-external-provisioner which will create the NFS storage class, nfs-client.

It should be installed with the reclaim policy set to Retain, to ensure the backup is not lost when a volume is deleted.

helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner     --set nfs.server=     --set nfs.path=/var/nfs/general --set nfs.reclaimPolicy=Retain --set “nfs.mountOptions={}
Enter fullscreen mode Exit fullscreen mode

Configuring the Backup Operator

In your local cluster in Rancher, select the Rancher Backup application from the App catalog. Upon beginning the installation, you will select “Use an existing StorageClass”:

Radio button offering option of existing storage class as backup target

And select the newly installed nfs-client StorageClass and a size for the backup volume:

dropdown with storageclass name of nfs-client

Upon completing installation, you can verify the status of the PV as Bound:

$ kubectl get pv
Enter fullscreen mode Exit fullscreen mode

kubectl output of persistentvolume status

The Reclaim Policy, Access Mode, and Capacity will be visible in the output of this command as well.

Top comments (0)