sdelements / lets-chat

Self-hosted chat app for small teams
http://sdelements.github.io/lets-chat
MIT License
9.77k stars 1.58k forks source link

Best backup practice? #595

Open k0nsl opened 9 years ago

k0nsl commented 9 years ago

What's the best backup practice when using let's chat deployed with Docker?

TimWolla commented 9 years ago

Personally I use the following command to back up my MongoDB:

docker run -i --rm --link <name_of_the_mongo_container>:mongo mongo /bin/bash -c "mongodump --host mongo > /dev/null 2>&1 && tar c /dump"

This will create a tar stream in STDOUT which you can redirect into a file of your choice.

k0nsl commented 9 years ago

Thank you @TimWolla, I will try that.

mtrycz commented 9 years ago

You will also have to backup all the files attached in conversations. But that's probably easier. Here are the backup instructions from the offical Mongo manual: http://docs.mongodb.org/manual/core/backups/