velero: Velero restore doesnt restore the content of the PV on GKE

What steps did you take and what happened:

Hi Team,

We have installed velero on our GKE Cluster , We are able to backup everything Including PV,PVC’s ,Deployments etc . But we don’t see any of our PV content being backed up . Velero is just creating the empty pv’s without any configurations or data

What did you expect to happen:

velero restore should also restore the Application Content , For ex: DB data ,Tables etc

The output of the following commands will help us better understand what’s going on: (Pasting long output into a GitHub gist or other pastebin is fine.)

  • kubectl logs deployment/velero -n velero please find the logs
  • velero backup describe <backupname> or kubectl get backup/<backupname> -n velero -o yaml Please find the backup details
  • velero backup logs <backupname> Please find the backup logs
  • velero restore describe <restorename> or kubectl get restore/<restorename> -n velero -o yaml Please find the restore details

Anything else you would like to add: Installation Guide Command Used : velero install --provider gcp --plugins velero/velero-plugin-for-gcp:latest --use-restic --wait --bucket $BUCKET --default-volumes-to-restic --secret-file ./credentials-velero

Environment:

  • Velero version (use velero version):
Client:
        Version: v1.6.3
        Git commit: 5fe3a50bfddc2becb4c0bd5e2d3d4053a23e95d2
Server:
        Version: v1.6.3
  • Velero features (use velero client config get features): features: <NOT SET>
  • Kubernetes version (use kubectl version):
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.0", GitCommit:"cb303e613a121a29364f75cc67d3d580833a7479", GitTreeState:"clean", BuildDate:"2021-04-08T16:31:21Z", GoVersion:"go1.16.1", Compiler:"gc", Platform:"windows/amd64"}
Server Version: version.Info{Major:"1", Minor:"20+", GitVersion:"v1.20.9-gke.1001", GitCommit:"1fe18c314ed577f6047d2712a9d1c8e498e22381", GitTreeState:"clean", BuildDate:"2021-08-23T23:06:28Z", GoVersion:"go1.15.13b5", Compiler:"gc", Platform:"linux/amd64"}
  • Cloud provider or hardware configuration: GCP

The restore logs is of new backup restore installation . I have pasted our logs that we tried earlier in this Issue Vote on this issue!

I have already posted on Discussions & Slack Channels but there is no help, hence creating an issue

Thanks Nisha

This is an invitation to the Velero community to vote on issues, you can see the project’s top voted issues listed here.
Use the “reaction smiley face” up to the right of this comment to vote.

  • 👍 for “I would like to see this bug fixed as soon as possible”
  • 👎 for “There are more important bugs to focus on right now”

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments

Hi @reasonerjt

Please find the commands i used

#backup
velero backup create name of the backup --selector app=mysql
#restore
velero restore create --from-backup backup-name 

FYI: We have annotated the pods for backing up the volumes

kubectl annotate pod/podname backup.velero.io/backup-volumes=pv-name Restore Logs

kubectl describe daemonSet   restic -n velero
Name:           restic
Selector:       name=restic
Node-Selector:  <none>
Labels:         component=velero
Annotations:    deprecated.daemonset.template.generation: 1
Desired Number of Nodes Scheduled: 4
Current Number of Nodes Scheduled: 4
Number of Nodes Scheduled with Up-to-date Pods: 4
Number of Nodes Scheduled with Available Pods: 4
Number of Nodes Misscheduled: 0
Pods Status:  4 Running / 0 Waiting / 0 Succeeded / 0 Failed
Pod Template:
  Labels:           component=velero
                    name=restic
  Service Account:  velero
  Containers:
   restic:
    Image:      velero/velero:v1.6.3
    Port:       <none>
    Host Port:  <none>
    Command:
      /velero
    Args:
      restic
      server
      --features=
    Limits:
      cpu:     1
      memory:  1Gi
    Requests:
      cpu:     500m
      memory:  512Mi
    Environment:
      NODE_NAME:                        (v1:spec.nodeName)
      VELERO_NAMESPACE:                 (v1:metadata.namespace)
      VELERO_SCRATCH_DIR:              /scratch
      GOOGLE_APPLICATION_CREDENTIALS:  /credentials/cloud
      AWS_SHARED_CREDENTIALS_FILE:     /credentials/cloud
      AZURE_CREDENTIALS_FILE:          /credentials/cloud
      ALIBABA_CLOUD_CREDENTIALS_FILE:  /credentials/cloud
    Mounts:
      /credentials from cloud-credentials (rw)
      /host_pods from host-pods (rw)
      /scratch from scratch (rw)
  Volumes:
   host-pods:
    Type:          HostPath (bare host directory volume)
    Path:          /var/lib/kubelet/pods
    HostPathType:
   scratch:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:
    SizeLimit:  <unset>
   cloud-credentials:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  cloud-credentials
    Optional:    false
Events:          <none>

Kindly let me know if you need any other info