# \[error\]: Percona backup for MongoDB -- Error while doing Restore -- "not master"

**URL:** <https://forums.percona.com/t/error-percona-backup-for-mongodb-error-while-doing-restore-not-master/7538>\
**Category:** Percona Server for MongoDB\
**Created:** [April 15, 2020, 2:54am UTC](https://forums.percona.com/t/error-percona-backup-for-mongodb-error-while-doing-restore-not-master/7538 "2020-04-15T02:54:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gowtham\_Raj](https://avatars.discourse-cdn.com/v4/letter/g/4491bb/32.png) [@Gowtham\_Raj](https://forums.percona.com/u/Gowtham_Raj)\
**Post date:** [April 15, 2020, 2:54am UTC](https://forums.percona.com/t/error-percona-backup-for-mongodb-error-while-doing-restore-not-master/7538/1 "2020-04-15T02:54:26Z")

</div>

Hello team,  
pbm version:

```auto
Version:&nbsp; &nbsp;1.1.1Platform:&nbsp; linux/amd64GitCommit: 457bc0eaf861c8c15c997333ce1d8108a138874bGitBranch: masterBuildTime: 2020-01-31_08:16_UTCGoVersion: go1.12.9

```

pbm\_config.yaml

```auto
storage:&nbsp;type: filesystem&nbsp;filesystem:&nbsp; &nbsp;path: /backup/

```

I have a 3 node - PSS cluster. I have pbm-agent setup on all 3 nodes. I take backup onto NFS mount point. Permissions look correct.&nbsp;PBM backups are successful.  
  
When I try do restore, it automatically chose the primary for restore , but it failed at the end saying Not master. The mongoDB URI contains all the 3 nodes. And one node is primary.   
  
2020/04/13 12:55:12 Got command restore 2020-04-13T11:21:15Z2020/04/13 12:55:12 [INFO] Restore of ‘2020-04-13T11:21:15Z’ started2020-04-13T12:55:12.860+0000&nbsp; &nbsp; preparing collections to restore from2020-04-13T12:55:12.879+0000&nbsp; &nbsp; finished restoring admin.myOutput (0 documents, 0 failures)2020/04/13 12:55:12 [ERROR] restore: restore mongo dump (successes: 0 / fails: 0): admin.my&nbsp; &nbsp; Output: error dropping collection: (NotMaster) not master  
I then remove changed the URI to point to only the master and tried again, and getting the same error.  
  
Any idea how to debug or what might cause this issue? The online docs does not say how to resolve this.  
Should we be restoring on to a new empty cluster? or the existing cluster?

---

<div class="post-metadata">

**Author:** ![Akira\_Kurogane](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/akira_kurogane/32/1280_2.png) [@Akira\_Kurogane](https://forums.percona.com/u/Akira_Kurogane)\
**Post date:** [May 7, 2020, 2:44am UTC](https://forums.percona.com/t/error-percona-backup-for-mongodb-error-while-doing-restore-not-master/7538/2 "2020-05-07T02:44:11Z")

</div>

Hi Gowtham.  
That looks like a bug - maybe one fixed for your case by version 1.1.3 by PBM-419 or PBM-425 (see&nbsp;[https://www.percona.com/doc/percona-backup-mongodb/release-notes/1.1.3.html](https://www.percona.com/doc/percona-backup-mongodb/release-notes/1.1.3.html "Link: https://www.percona.com/doc/percona-backup-mongodb/release-notes/1.1.3.html")) but maybe not.  
Could you please create a new bug for this at&nbsp;[https://jira.percona.com/projects/PBM/issues/](https://jira.percona.com/projects/PBM/issues/ "Link: https://jira.percona.com/projects/PBM/issues/")&nbsp;?  
Best regards,  
Akira
