Rocket.chat: Back up mongodb

Created on 19 Sep 2016  路  7Comments  路  Source: RocketChat/Rocket.Chat

Your Rocket.Chat version: .39

Since rocket doesn't have a back up feature, it really needs one.

How does one go about backing up a mongodb instance inside of a docker-compose container?

Request app settings

Most helpful comment

Hello,
I usually do:
docker cp <dump> mongo:/tmp
docker exec -it mongo bash
mongorestore -d rocketchat /dump

All 7 comments

I've done similar (almost the same) by adding another container to my compose file:

  mongo-dump:
    image: mongo:3.2
    volumes:
      - ./data/dump:/dump
    command: "mongodump -h mongo -o /dump/ --gzip"
    networks:
      - back-tier

Then I call it from crontab with something like:
55 18 * * * /usr/local/bin/docker-compose up mongo-dump

What about restore?

@wargamesqcf: you can restore via Docker.

In my case I would use: docker load -i /home/rocketchat/backups/mongodb.20161020-083648.tar

PS:
A built-in backup feature would be awesome and very useful. At the very least some type of backup feature to import and export users.

Hello,
I usually do:
docker cp <dump> mongo:/tmp
docker exec -it mongo bash
mongorestore -d rocketchat /dump

crontab -e
12 3 * * * /usr/bin/mongodump --quiet --out /var/backups/rocketchatmongobackup

Dumps a daily backup at 3:12

@rocket-cat close

Hi @wargamesqcf

I am closing this issue because we think there is no actual bug in Rocket.Chat in what you're describing. Here's why:

  • backing up mongodb is not something in the scope of the rocket.chat server.

We use Github mainly for discussing bugs though. We understand, that setting up and operating a Rocket.Chat server is not trivial, yet we do not have the woman/man-power to help everybody. That is unfortunate, but simply a limitation of time. If it should turn out from your feedback to this message, that there is a bug involved, we will try to fix it with you.

That being said, we are very thankful that our community also does a great job in helping each other. I would therefore like to point you to some places where you can try asking for help. Usually, some friendly human being has time for you and your issue:

If you don't find a solution to your problem there, don't fret, as we also offer paid support: https://rocket.chat/support

You could, of course, spare yourself the hassle entirely and just choose the hosted version, where we provide you with a running Rocket.Chat instance: https://rocket.chat/cloud

Cheers
Thomas

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Kiran-Rao picture Kiran-Rao  路  3Comments

amayer5125 picture amayer5125  路  3Comments

karlprieb picture karlprieb  路  3Comments

neha1deshmukh picture neha1deshmukh  路  3Comments

mattlin picture mattlin  路  3Comments