Unable to restore the PSMDB backup data on a new Kubernetes cluster

I’m trying to restore the data on the Kubernetes-based cluster different from one that I have the backup using the following content in restore.yml file.

apiVersion: psmdb.percona.com/v1
kind: PerconaServerMongoDBRestore
metadata:
name: restore1
namespace: commonns
spec:
clusterName: mano-db-percona
backupSource:
destination: s3://mano-cloud2-backup/2021-07-26T06:49:44Z
s3:
credentialsSecret: mano-db-percona-backup-s3
region: ap-south-1
endpointUrl:

Executed “kubectl apply -f backup/restore.yml” and got the below output.

kubectl apply -f backup/restore.yaml
perconaservermongodbrestore.psmdb.percona.com/restore1 created

But, the psmdb-restore action never starts and the status is shown empty always.

kubectl get psmdb-restore --all-namespaces
NAMESPACE NAME CLUSTER STATUS AGE
commonns restore1 mano-db-percona 29s

The S3 bucket name is mano-cloud2-backup and the credentialSecret defined in cr.yaml is mano-db-percona-backup-s3.
I’m able to take backups using this configuration and able to restore on the same kubernetes environment where the backup was taken.

The restore never starts when attempted on a new k8s environment using the backupSource option.

I really appreciate any pointers on what is wrong in the above procedure and that would help me crossing this hurdle.

Thanks in advance for the support.

1 Like

Hi @siva !

Could you please check operator logs if there’s some error printed there and also “kubectl get pxc-restore restore1 -oyaml” (there might be some more info there).
Apart from that please try to specify bucket and endpointUrl in backupSource->s3 part of yaml, something like:

      bucket: mano-cloud2-backup
      endpointUrl: https://s3.ap-south-1.amazonaws.com/

It might be that empty endpointUrl key and missing bucket are the problem (and if that’s the case then documentation should probably be updated).

1 Like

Hi,

Thank you very much for the reply and pointer to check the Percona operator logs.
The restore worked fine after correcting the restore.yaml as below. The backupName and backupSource options are required to get the restore working on a fresh cluster. There was an error reported in the Percona operator log when the backupName option was missing.

apiVersion: psmdb.percona.com/v1
kind: PerconaServerMongoDBRestore
metadata:
name: restore3
namespace: commonns
spec:
clusterName: mano-db-percona
storageName: s3-ap-south
backupName: 2021-07-20T03:37:46Z
backupSource:
destination: s3://mano-cloud2-backup/2021-07-20T03:37:46Z

I think this should be updated in the document that backName and backupSource are mandatory options when restoring on a fresh K8S cluster.

Also, I have another query on the support to backup and restore to the local filesystem similar to PerconaXtraDBClusterBackup as below.

storages:
  fs-pvc:
    type: filesystem
    volume:
      persistentVolumeClaim:
        accessModes: [ "ReadWriteOnce" ]
        resources:
          requests:
            storage: 6Gi
1 Like