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

**URL:** https://forums.percona.com/t/unable-to-restore-the-psmdb-backup-data-on-a-new-kubernetes-cluster/11529
**Category:** Percona Operator for MongoDB
**Created:** [July 26, 2021, 3:55pm UTC](https://forums.percona.com/t/unable-to-restore-the-psmdb-backup-data-on-a-new-kubernetes-cluster/11529 "2021-07-26T15:55:36Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![siva](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@siva](https://forums.percona.com/u/siva)
#### Post date: [July 26, 2021, 3:55pm UTC](https://forums.percona.com/t/unable-to-restore-the-psmdb-backup-data-on-a-new-kubernetes-cluster/11529/1 "2021-07-26T15:55:36Z")

</div>

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](http://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](http://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.

---

<div class="post-metadata">

### Author: ![Tomislav\_Plavcic](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/tomislav_plavcic/32/9717_2.png) [@Tomislav\_Plavcic](https://forums.percona.com/u/Tomislav_Plavcic)
#### Post date: [July 26, 2021, 7:08pm UTC](https://forums.percona.com/t/unable-to-restore-the-psmdb-backup-data-on-a-new-kubernetes-cluster/11529/2 "2021-07-26T19:08:49Z")

</div>

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:

```auto
      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).

---

<div class="post-metadata">

### Author: ![siva](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@siva](https://forums.percona.com/u/siva)
#### Post date: [July 30, 2021, 9:19am UTC](https://forums.percona.com/t/unable-to-restore-the-psmdb-backup-data-on-a-new-kubernetes-cluster/11529/3 "2021-07-30T09:19:42Z")

</div>

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](http://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

```
