I have two rocketchat instances up and running and work without problem. this two rocketchat servers was for two separate company and the decided to merge the company’s.
thats why, we need to merge rocketchat.
my data files stores in amazon aws s3 buckets so thats easy.
but the groups, discussions, private messages are stored locally in servers.
how can i migrate one to another? i found a thread that mentioned this request before but that did not go well.
i think the first part should be to migrate both rc instances to docker, but i don’t know whats the next step
In theory as long as unique users…. It might be ok
The #general channel on both would clash… not sure how well the messages and state of that channel would reconcile. Settings would clash… so would have to pick one to win and wipe out the settings in the mongodump from the other.
Other than that… it might ok-ish
You need to set up a test rig and play. I’m not sure what other duplicate issjes you’d need to check - channel names etc
@imanerfanian please come back and share what you have to do (if you are successful in merging the servers). I am quite sure it can be useful information for another community member sometimes in the future.
i manage to merge the collections. rocketchat service did not run bevause of Rocket.Cat duplicated is both instances. i removeed it and service started normally. it goes to “Setup wizard” page.
i set value of setup wizard from database to “Completed” and it works.
now rocketchat is up and runnin and my both users are exist, but, no message is showing to me!
even the input part is not working.
there is some errors in browser console but i really can’t figure it out anymore
because my files stored in AWS S3 Buckets, i didn’t merge rocketchat_uploads.chunks but if you store it inside database ( not recommended ) you need to merge that too.
also, there was some duplicated usernames in both databases and before starting the merge process, i rename them and added “_old” to end of usernames.
you can skip duplicated users or even delete them. its your call.
with help of chatgpt, i wrote a python script for handling duplicated users.
just remember
always work on test lab
always create backup before doing anything. even single mongo command!
your both instances need to be at the same version. ( Both rocketchat & mongo )
if you need any question or need my help for this project, feel free to contact me
i will do it in another topic. i just don’t have a time right now but i will create full step by step with all of commands and codes as soon as possible.