Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Back up mongodb

Open wargamesqcf opened this issue 10 years ago • 7 comments

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?

wargamesqcf avatar Sep 19 '16 16:09 wargamesqcf

See my comment here https://github.com/RocketChat/Rocket.Chat/issues/758#issuecomment-248075332

lucasvanhalst avatar Sep 19 '16 18:09 lucasvanhalst

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

zahaim avatar Oct 26 '16 12:10 zahaim

What about restore?

wargamesqcf avatar Oct 27 '16 20:10 wargamesqcf

@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.

k0nsl avatar Oct 27 '16 21:10 k0nsl

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

zahaim avatar Oct 28 '16 07:10 zahaim

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

Dumps a daily backup at 3:12

rasos avatar Oct 24 '17 19:10 rasos

@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:

  • The Rocket.Chat Community Support Channel: https://open.rocket.chat/channel/support
  • The Rocket.Chat Community Support Forum: https://forums.rocket.chat/c/community-support

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

TwizzyDizzy avatar Feb 14 '18 20:02 TwizzyDizzy