Restoring NFS Volume Backups in Google Cloud ​
WARNING
This is a beta feature available only per request for SAP-internal teams.
This tutorial explains how to initiate a restore operation for the Network File System (NFS) volumes in Google Cloud. You can do it either using an existiong filestore or a new one.
Prerequisites ​
- You have the Cloud Manager module added.
- You have created a GcpNfsVolume. See Use Network File System in Google Cloud.
- You have created a GcpNfsVolumeBackup. See Back Up Network File System Volumes in Google Cloud.
NOTE
All the examples below assume that the GcpNfsVolume is named my-vol, the GcpNfsVolumeBackup is named my-backup and both are in the same namespace as the GcpNfsVolumeRestore resource.
Use an Existing Filestore ​
Steps ​
Export the namespace as an environment variable.
shellexport NAMESPACE={NAMESPACE_NAME}Create an GcpNfsVolumeRestore resource.
shellcat <<EOF | kubectl -n $NAMESPACE apply -f - apiVersion: cloud-resources.kyma-project.io/v1beta1 kind: GcpNfsVolumeRestore metadata: name: my-restore spec: source: backup: name: my-backup namespace: $NAMESPACE destination: volume: name: my-vol namespace: $NAMESPACE EOFWait for the GcpNfsVolumeRestore to be in the
Donestate and have theReadycondition.shellkubectl -n $NAMESPACE wait --for=condition=Ready gcpnfsvolumerestore/my-restore --timeout=600sOnce the GcpNfsVolumeRestore is completed, you should see the following message:
consolegcpnfsvolumerestore.cloud-resources.kyma-project.io/my-restore condition met
Next Steps ​
To clean up, remove the created GcpNfsVolumeRestore:
kubectl delete -n $NAMESPACE gcpnfsvolumerestore my-restoreCreate a New Filestore ​
Steps ​
Export the namespace as an environment variable. Run:
shellexport NAMESPACE={NAMESPACE_NAME}Create a new GcpNfsVolume resource with
sourceBackupreferring to the existing backup.shellcat <<EOF | kubectl -n $NAMESPACE apply -f - apiVersion: cloud-resources.kyma-project.io/v1beta1 kind: GcpNfsVolume metadata: name: my-vol2 spec: location: us-west1-a capacityGb: 1024 sourceBackup: name: my-backup namespace: $NAMESPACE EOFWait for the GcpNfsVolume to be in the
Readystate.shellkubectl -n $NAMESPACE wait --for=condition=Ready gcpnfsvolume/my-vol2 --timeout=600sOnce the GcpNfsVolume is created, you should see the following message:
consolegcpnfsvolume.cloud-resources.kyma-project.io/my-vol2 condition met
Next Steps ​
To clean up, remove the created GcpNfsVolume:
kubectl delete -n $NAMESPACE gcpnfsvolume my-vol2