# Rocket chat backup and restore in docker

**URL:** <https://forums.rocket.chat/t/rocket-chat-backup-and-restore-in-docker/11068>\
**Category:** Development\
**Tags:** rocketchat-apps\
**Created:** [April 29, 2021, 8:22am UTC](https://forums.rocket.chat/t/rocket-chat-backup-and-restore-in-docker/11068 "2021-04-29T08:22:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hafija](https://avatars.discourse-cdn.com/v4/letter/h/46a35a/32.png) [@hafija](https://forums.rocket.chat/u/hafija)\
**Post date:** [April 29, 2021, 8:22am UTC](https://forums.rocket.chat/t/rocket-chat-backup-and-restore-in-docker/11068/1 "2021-04-29T08:22:11Z")

</div>

Could any one give me rocket chat backup and restore system for docker install?

---

<div class="post-metadata">

**Author:** ![john.crisp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/john.crisp/32/2711_2.png) [@john.crisp](https://forums.rocket.chat/u/john.crisp)\
**Post date:** [April 29, 2021, 12:06pm UTC](https://forums.rocket.chat/t/rocket-chat-backup-and-restore-in-docker/11068/2 "2021-04-29T12:06:09Z")

</div>

It varies a bit on whether you use bridge or host networking.

Just search the interwebs for something like:

`docker mongo backup DB`

eg this for bridged which you most likely have:

> **[🐳 mongodump and mongorestore with Docker](https://dev.to/mkubdev/mongodump-and-mongorestore-with-docker-39m7)**
>
> Hi! TIL how to restore and dump a MongoDB container. The trick is to disable pseudo-tty allocation. O...

---

<div class="post-metadata">

**Author:** ![john.crisp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/john.crisp/32/2711_2.png) [@john.crisp](https://forums.rocket.chat/u/john.crisp)\
**Post date:** [May 11, 2021, 10:40pm UTC](https://forums.rocket.chat/t/rocket-chat-backup-and-restore-in-docker/11068/3 "2021-05-11T22:40:08Z")

</div>

I also created a little guide here - please let me know your experiences.

> [@\[HOW TO\] Docker backup mongo](https://forums.rocket.chat/t/how-to-docker-backup-mongo/11155):
>
> This question is asked frequently. How do I backup and restore a mongo DB in a docker container. We first need to find the container label. You may need sudo for the following commands. docker ps -a NAMES docker\_mongo\_1 So we need to do this: docker exec docker\_mongo\_1 sh -c 'mongodump --archive' \> db.dump And in the current directory you should find db.dump Restore should be the reverse process: docker exec -i docker\_mongo\_1 sh -c 'mongorestore --archive' \< db.dump This is quite a go…
