# Mongorestore doesn't restore messages

**URL:** <https://forums.rocket.chat/t/mongorestore-doesnt-restore-messages/21133>\
**Category:** Community Support\
**Tags:** docker\
**Created:** [December 17, 2024, 4:26pm UTC](https://forums.rocket.chat/t/mongorestore-doesnt-restore-messages/21133 "2024-12-17T16:26:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aembrey](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@aembrey](https://forums.rocket.chat/u/aembrey)\
**Post date:** [December 17, 2024, 4:26pm UTC](https://forums.rocket.chat/t/mongorestore-doesnt-restore-messages/21133/1 "2024-12-17T16:26:11Z")

</div>

### Description

Using:  
`docker exec -i container_id sh -c 'mongorestore --archive' > ~/rocket.backups/db.dump`

Does not restore conversations between users. It does restore users and any settings I had. The last entry of the mongorestore states a certain number of files failed to restore, but I haven’t figured out how to redirect the output of the above command so that I can check for errors. Any suggestions would be helpful.

### Server Setup Information

- Version of Rocket.Chat Server: 7.1.0
- Operating System: RHEL 8
- Deployment Method: docker
- Number of Running Instances: 1
- DB Replicaset Oplog: Not sure what this is
- NodeJS Version: N/A
- MongoDB Version: 6.0.13
- Proxy: apache
- Firewalls involved: N/A

### Any additional Information

This is a very early deployment of Rocket.Chat. The “conversations” are brief messages sent between Admin created users. So I’m also not sure if this is because of how little data is actually being restored, however I wanted some level of confirmation so I can present to leadership whether the backup method is effective. Overall this is my first time working with Mongodb and Rocket.Chat

---

<div class="post-metadata">

**Author:** ![reetp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/reetp/32/5546_2.png) [@reetp](https://forums.rocket.chat/u/reetp)\
**Post date:** [December 18, 2024, 8:19am UTC](https://forums.rocket.chat/t/mongorestore-doesnt-restore-messages/21133/2 "2024-12-18T08:19:52Z")

</div>

It’s a mongo issue more than Rocket.

Think your problem, if it exists, is the dump.

On my non docker mongo I use

`mongodump -d rocketchat -o /root/backup`

That creates a directory with the dump files.

You then restore from that directory.

So how did you create yours?

---

<div class="post-metadata">

**Author:** ![reetp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/reetp/32/5546_2.png) [@reetp](https://forums.rocket.chat/u/reetp)\
**Post date:** [December 18, 2024, 5:18pm UTC](https://forums.rocket.chat/t/mongorestore-doesnt-restore-messages/21133/3 "2024-12-18T17:18:43Z")

</div>

Note you should get a pile of bson files.

You can view them doing something like:

`bsondump users.bson |jq`
