Backing Up NFS Volumes in Google Cloud ​
WARNING
This is a beta feature available only per request for SAP-internal teams.
This tutorial explains how to create backups for Network File System (NFS) volumes in Google Cloud.
Prerequisites ​
- You have the Cloud Manager module added.
- You have created a GcpNfsVolume. See Use Network File System in Google Cloud.
NOTE
All the examples below assume that the GcpNfsVolume is named my-vol and is in the same namespace as the GcpNfsVolumeBackup resource.
Steps ​
Export the namespace as an environment variable. Run:
shellexport NAMESPACE={NAMESPACE_NAME}Create an GcpNfsVolumeBackup resource.
shellcat <<EOF | kubectl -n $NAMESPACE apply -f - apiVersion: cloud-resources.kyma-project.io/v1beta1 kind: GcpNfsVolumeBackup metadata: name: my-backup spec: source: volume: name: my-vol EOFWait for the GcpNfsVolumeBackup to be in the
Readystate.shellkubectl -n $NAMESPACE wait --for=condition=Ready gcpnfsvolumebackup/my-backup --timeout=300sOnce the GcpNfsVolumeBackup is created, you should see the following message:
consolegcpnfsvolumebackup.cloud-resources.kyma-project.io/my-backup condition metObserve the location of the created backup.
shellkubectl -n $NAMESPACE get gcpnfsvolumebackup my-backup -o jsonpath='{.status.location}{"\n"}'
Next Steps ​
To clean up, remove the created GcpNfsVolumeBackup:
shell
kubectl delete -n $NAMESPACE gcpnfsvolumebackup my-backup