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

Backup Restore option in Settings under Administrator

Open Megatronic79 opened this issue 11 years ago • 41 comments

Backup \ export \ import options in Administrator settings page to\from tar file that can be used to re-deploy to another server with all data (including channel data)

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Megatronic79 avatar Sep 11 '15 14:09 Megatronic79

:+1: @Megatronic79 is transforming Rocket.Chat into an Enterprise grade platform - one feature at a time.

Sing-Li avatar Sep 11 '15 14:09 Sing-Li

haha - loving the product guys

Megatronic79 avatar Sep 11 '15 14:09 Megatronic79

This will probably be pretty easy when @geekgonecrazy gets finished with his import-framework branch. :smile:

graywolf336 avatar Sep 11 '15 14:09 graywolf336

Nice

engelgabriel avatar Sep 13 '15 02:09 engelgabriel

Related to #746 - download history

marceloschmidt avatar Sep 17 '15 00:09 marceloschmidt

Isn't this also related with #332 and #992 ? at least the "restore option"

I know they are different. This is an "import" option for the proper rocketchat backup, but it could be all the same process. An import / export wrapper and libraries to export / import to different formats (rocket chat itself, slack, hipchat and so on).

For example, in my work we're currently using hipchat and having an "import from hipchat" option would make us change from hipchat to rocketchat without thinking in it.

elboletaire avatar Nov 17 '15 14:11 elboletaire

@elboletaire Yes, there has been some work on an import framework which will allow people to create imports for any other chat service out there. Slack one is in progress and I agree that the export should be similar for Rocket.Chat.

graywolf336 avatar Nov 17 '15 15:11 graywolf336

@elboletaire Yes, there has been some work on an import framework which will allow people to create imports for any other chat service out there. Slack one is in progress and I agree that the export should be similar for Rocket.Chat.

nice! I shall be attentive to it :smile:

elboletaire avatar Nov 17 '15 15:11 elboletaire

I am also wanting this feature.

wargamesqcf avatar Sep 11 '16 01:09 wargamesqcf

almost a year, still don't have progress?

9cat avatar Sep 12 '16 03:09 9cat

@9cat we haven't gotten to this yet. We have some other key things we need to take care of first. But... Since Rocket.Chat is self hosted, you can back up the database at absolutely any time you want via mongo.

geekgonecrazy avatar Sep 12 '16 03:09 geekgonecrazy

It's very easy to script the backup and schedule via mongodump.

dupree972 avatar Sep 12 '16 04:09 dupree972

This is my script I run from crontab once per hour

backup.sh #!/bin/sh

daten=$(date +%y%m%d%H%M) mongodump -o /home/user/backup/$daten

lunitic avatar Sep 12 '16 13:09 lunitic

How can I get that to work when my mongodb is inside of a docker-compose container @lunitic ?

wargamesqcf avatar Sep 19 '16 17:09 wargamesqcf

@wargamesqcf something like this.. docker run -it --rm --link rocketchat_mongo_1:db -v $PWD:/backup mongo mongodump -h db -o /backups/<yourfilename>

Haven't tested this, but I think will work.

geekgonecrazy avatar Sep 19 '16 17:09 geekgonecrazy

its not rocketchat_mongo_1:db its whatever your username is _mongo_1:db

Now the question comes how do I restore the backup

wargamesqcf avatar Sep 19 '16 17:09 wargamesqcf

@wargamesqcf yeah actually I think its dependent on the name of the folder you have the docker-compose file in. I personally put mine in a folder rocketchat so mine is always prefixed with rocketchat. But if you are running it from your home folder... then yeah it'd start with your username :smile:

geekgonecrazy avatar Sep 19 '16 17:09 geekgonecrazy

yep that probably what is happening, but you should output something to /backups folder in linux right?

wargamesqcf avatar Sep 19 '16 17:09 wargamesqcf

@wargamesqcf that command would run inside the container and put the backup inside of the /backup folder inside the container. That folder is mounted to your file system to $PWD which represents your current folder. If you wanted to dump it into a certain folder then you would change $PWD:/backups to something like /backups:/backups and then on server backups would be found in /backups

geekgonecrazy avatar Sep 19 '16 17:09 geekgonecrazy

That worked! now how do we reserves this if/when the mongodb crashes and dies?

docker run -it --link foldername_mongo_1:db -v /backups:/backups mongo mongodump -h db -o /backups/test

wargamesqcf avatar Sep 19 '16 17:09 wargamesqcf