# MongoDb dump needs to restore on percona mongoDB with encrypation

**URL:** <https://forums.percona.com/t/mongodb-dump-needs-to-restore-on-percona-mongodb-with-encrypation/11498>\
**Category:** Percona Server for MongoDB\
**Created:** [July 24, 2021, 9:32am UTC](https://forums.percona.com/t/mongodb-dump-needs-to-restore-on-percona-mongodb-with-encrypation/11498 "2021-07-24T09:32:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vijendra](https://avatars.discourse-cdn.com/v4/letter/v/e95f7d/32.png) [@vijendra](https://forums.percona.com/u/vijendra)\
**Post date:** [July 24, 2021, 9:32am UTC](https://forums.percona.com/t/mongodb-dump-needs-to-restore-on-percona-mongodb-with-encrypation/11498/1 "2021-07-24T09:32:10Z")

</div>

Hi I have installed percona mongodb with vault.  
Now I have a normal backup of mongodb and now I need to restore normal db to percona mongodb with enable encryption.

Can any one help me on this.

---

<div class="post-metadata">

**Author:** ![jenunes](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jenunes/32/9331_2.png) [@jenunes](https://forums.percona.com/u/jenunes)\
**Post date:** [August 13, 2021, 11:25pm UTC](https://forums.percona.com/t/mongodb-dump-needs-to-restore-on-percona-mongodb-with-encrypation/11498/2 "2021-08-13T23:25:53Z")

</div>

Hi @vijendra

When you mean _vault_, I’m assuming you are referencing using vault to store the Master Key for Data at Rest Encryption.

If your target MongoDB already has it enabled(_[Data at Rest Encryption](https://www.percona.com/doc/percona-server-for-mongodb/LATEST/data_at_rest_encryption.html)_) you can simply restore the data; If it’s a **mongodump** backup.

In the following example, I have an encrypted node:  
`{"t":{"$date":"2021-08-13T20:00:08.367-03:00"},"s":"I", "c":"STORAGE", "id":29039, "ctx":"initandlisten","msg":"Encryption keys DB is initialized successfully"}`

Them, I’m going to restore my backup via **mongorestore** , which is was created normally from mongodump:

```auto
**mongorestore** -h localhost --port 4460 -uadmin -psekret --authenticationDatabase admin /mydump/
|2021-08-13T20:15:12.635-0300|preparing collections to restore from|
|---|---|
|2021-08-13T20:15:12.635-0300|reading metadata for percona.date from /mydump/percona/date.metadata.json|
|2021-08-13T20:15:12.648-0300|restoring percona.date from /mydump/percona/date.bson|
|2021-08-13T20:15:13.413-0300|finished restoring percona.date (100000 documents, 0 failures)|
|2021-08-13T20:15:13.413-0300|no indexes to restore for collection percona.date|
|2021-08-13T20:15:13.413-0300|100000 document(s) restored successfully. 0 document(s) failed to restore.|

```

Let me know if that clarified your question.  
Otherwise, feel free to provide further details.

Best,

Jean da Silva
