# Mongodb restore using PBM Requirements and consideration

**URL:** <https://forums.percona.com/t/mongodb-restore-using-pbm-requirements-and-consideration/18089>\
**Category:** Percona Operator for MongoDB\
**Created:** [October 19, 2022, 1:27pm UTC](https://forums.percona.com/t/mongodb-restore-using-pbm-requirements-and-consideration/18089 "2022-10-19T13:27:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![reab](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@reab](https://forums.percona.com/u/reab)\
**Post date:** [October 19, 2022, 1:27pm UTC](https://forums.percona.com/t/mongodb-restore-using-pbm-requirements-and-consideration/18089/1 "2022-10-19T13:27:01Z")

</div>

Regarding PBM backup and restore.

In case of two different clusters with same cluster/replica sets/config servers name  
Should the users on the backup source be identical to restore destination?

Nothing mentioned here regarding this [Restore a backup - Percona Backup for MongoDB](https://docs.percona.com/percona-backup-mongodb/usage/restore.html#restoring-a-backup-into-a-new-environment)

But I tried to restore from Cluster A to Cluster B with same names and config (same number of shards and everything except different internal users creds including backup user and cluster admin and cluster monitor admin etc …

and restore failed after few minutes, state for PerconaServerMongodbRestore was `running` for around 10 minutes but then it failed with this error and config servers pods went into crashloop

`check for concurrent jobs: getting pbm object: create PBM connection to psmdb-db-rs0-1.psmdb-db-rs0.psmdb-db-integration.svc.cluster.local:27017,psmdb-db-rs0-0.psmdb-db-rs0.psmdb-dd-integration.svc.cluster.local:27017,psmdb-db-rs0-2.psmdb-db-rs0.psmdb-db-integration.svc.cluster.local:27017: create mongo connection to configsvr with connection string '` `mongodb://<CLUSTER-B_USER>` `: <CLUSTER_B_PASSWORD>@psmdb-db-cfg-0.psmdb-db-cfg.psmdb-db-integration.svc.cluster.local:27017,psmdb-db-cfg-1.psmdb-db-cfg.psmdb-db-integration.svc.cluster.local:27017,psmdb-db-cfg-2.psmdb-db-cfg.psmdb-db-integration.svc.cluster.local:27017/': mongo ping: connection() error occured during connection handshake: dial tcp: lookup psmdb-db-cfg-0.psmdb-db-cfg.psmdb-db-integration.svc.cluster.local on <LOCAL_IP>:53: no such host`

After this I updated cluster B to use same creds as cluster A, Retried to restore and it worked.

---

<div class="post-metadata">

**Author:** ![Sergey\_Pronin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sergey_pronin/32/14887_2.png) [@Sergey\_Pronin](https://forums.percona.com/u/Sergey_Pronin)\
**Post date:** [October 19, 2022, 6:07pm UTC](https://forums.percona.com/t/mongodb-restore-using-pbm-requirements-and-consideration/18089/2 "2022-10-19T18:07:19Z")

</div>

Hello @reab ,

just to clarify - are you talking about MongoDB clusters deployed with the Operator?

If so, you must have the same credentials for system users that Operator uses. You should set them in the Secrets. It is described [here](https://docs.percona.com/percona-operator-for-mongodb/backups.html#restore-the-cluster-from-a-previously-saved-backup).

> When restoring to a new Kubernetes-based environment, make sure it has a Secrets object with the same user passwords as in the original cluster. More details about secrets can be found in [System Users](https://docs.percona.com/percona-operator-for-mongodb/users.html#users-system-users). The name of the required Secrets object can be found out from the `spec.secrets` key in the `deploy/cr.yaml` (`my-cluster-name-secrets` by default).

And we are talking only about system users that Operator uses. Other users and roles can be different.
