Migrate the Rock

Dear members,

I going to migrate the rocket chat to latest version. I am facing the below error during the installation .

OS: ubuntu 22
Node: v18.14.1
mongo 6.0

ERROR
rocketchat.service - The Rocket.Chat server
Loaded: loaded (/lib/systemd/system/rocketchat.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/rocketchat.service.d
└─override.conf
Active: failed (Result: signal) since Tue 2023-02-21 09:21:25 UTC; 21s ago
Process: 7352 ExecStart=/usr/bin/node /opt/Rocket.Chat/main.js (code=killed, signal=ABRT)
Main PID: 7352 (code=killed, signal=ABRT)
CPU: 389ms

Feb 21 09:21:23 ip-172-31-21-176 systemd[1]: Started The Rocket.Chat server.
Feb 21 09:21:24 ip-172-31-21-176 rocketchat[7352]: node: …/src/coroutine.cc:134: void* find_thread_id_key(void*): Assertion `>
Feb 21 09:21:25 ip-172-31-21-176 systemd[1]: rocketchat.service: Main process exited, code=killed, status=6/ABRT
Feb 21 09:21:25 ip-172-31-21-176 systemd[1]: rocketchat.service: Failed with result ‘signal’.

Hi there! And Welcome to our community :hugs:

Best way to help you here:

What version are you running now? How is it deployed (guess it’s snap?)?

You will spin up a docker instance, using the very same version you have in snap.

then, you dump your snap data, and restore it on this docker instance.

we have some documentation that will help you on this tasks.

After, you start migrating and testing.

Remember to don’t skip majors

So 3.x > 4.x > 5.x

Let me know if this hels :slight_smile:

Thank you @dudanogueira for you response. Let me clear things here.

Currently i have old version of RC and it was installed through the manual installation.
Now i have installed the RC thorugh snap. So how do i migrate the database?

I was installed this Version 3.6.1. Now and it was installed using manual installation.

New Server
Now i have installed latest version using snap and my question is how to migrate the old RC data into snap. ?

Kindly let me know the solution and share the best approach to done this migration.

At the end of the day, is a matter of dumping the data base and restoring it at the new server.

We strongly recommend you to use Docker instead of snaps, as it will give you a more common environment to get help.

As you installed it manually, you will need to have access to mongo, and do the proper dump.

For a mongo restore, you can follow this doc:

@dudanogueira i have tried as you instructed. docker installed using composer and dumb and restored. Every thing perfect all users channel and rooms restored but when i login the user there was no data in chat.

during the restore i have getting below error. Can you please guide me.

2023-03-07T13:03:02.747+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_settings index: id dup key: { _id: Block_Multiple_Failed_Logins_Ip_Whitelist }
2023-03-07T13:03:02.747+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_settings index: id dup key: { _id: Login_Logs_Enabled }
2023-03-07T13:03:02.747+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_settings index: id dup key: { _id: Login_Logs_Username }
2023-03-07T13:03:02.747+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_settings index: id dup key: { _id: Login_Logs_UserAgent }
2023-03-07T13:03:02.747+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_settings index: id dup key: { _id: Login_Logs_ClientIp }
2023-03-07T13:03:02.747+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_settings index: id dup key: { _id: Login_Logs_ForwardedForIp }

Here is the more detail.

2023-03-07T13:03:01.334+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: mute-user }
2023-03-07T13:03:01.334+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: pin-message }
2023-03-07T13:03:01.335+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: post-readonly }
2023-03-07T13:03:01.335+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: preview-c-room }
2023-03-07T13:03:01.335+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: remove-closed-livechat-rooms }
2023-03-07T13:03:01.335+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: remove-user }
2023-03-07T13:03:01.335+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: run-import }
2023-03-07T13:03:01.336+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: run-migration }
2023-03-07T13:03:01.336+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: save-others-livechat-room-info }
2023-03-07T13:03:01.336+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: send-many-messages }
2023-03-07T13:03:01.337+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: set-leader }
2023-03-07T13:03:01.337+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: set-moderator }
2023-03-07T13:03:01.337+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: set-owner }
2023-03-07T13:03:01.337+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: set-react-when-readonly }
2023-03-07T13:03:01.338+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: set-readonly }
2023-03-07T13:03:01.338+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: snippet-message }
2023-03-07T13:03:01.338+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: unarchive-room }
2023-03-07T13:03:01.338+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: user-generate-access-token }
2023-03-07T13:03:01.338+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-broadcast-member-list }
2023-03-07T13:03:01.338+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-c-room }
2023-03-07T13:03:01.339+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-d-room }
2023-03-07T13:03:01.339+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-full-other-user-info }
2023-03-07T13:03:01.339+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-history }
2023-03-07T13:03:01.340+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-join-code }
2023-03-07T13:03:01.340+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-joined-room }
2023-03-07T13:03:01.340+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-l-room }
2023-03-07T13:03:01.340+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-livechat-manager }
2023-03-07T13:03:01.341+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-livechat-rooms }
2023-03-07T13:03:01.341+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-logs }
2023-03-07T13:03:01.341+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-other-user-channels }
2023-03-07T13:03:01.341+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-outside-room }
2023-03-07T13:03:01.341+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-p-room }
2023-03-07T13:03:01.342+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-privileged-setting }
2023-03-07T13:03:01.342+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-room-administration }
2023-03-07T13:03:01.342+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-statistics }
2023-03-07T13:03:01.342+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-user-administration }
2023-03-07T13:03:01.342+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: manage-cloud }
2023-03-07T13:03:01.343+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: manage-livechat-managers }
2023-03-07T13:03:01.343+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: manage-livechat-agents }
2023-03-07T13:03:01.343+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: manage-livechat-departments }
2023-03-07T13:03:01.343+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-livechat-departments }
2023-03-07T13:03:01.343+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: transfer-livechat-guest }
2023-03-07T13:03:01.344+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: add-livechat-department-agents }
2023-03-07T13:03:01.344+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-livechat-current-chats }
2023-03-07T13:03:01.344+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-livechat-analytics }
2023-03-07T13:03:01.346+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-livechat-real-time-monitoring }
2023-03-07T13:03:01.346+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-livechat-triggers }
2023-03-07T13:03:01.347+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-livechat-customfields }
2023-03-07T13:03:01.347+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-livechat-installation }
2023-03-07T13:03:01.347+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-livechat-appearance }
2023-03-07T13:03:01.358+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-livechat-webhooks }
2023-03-07T13:03:01.358+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-livechat-facebook }
2023-03-07T13:03:01.359+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: manage-incoming-integrations }
2023-03-07T13:03:01.359+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: manage-outgoing-integrations }
2023-03-07T13:03:01.359+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: manage-own-incoming-integrations }
2023-03-07T13:03:01.360+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: manage-own-outgoing-integrations }
2023-03-07T13:03:01.360+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: view-livechat-business-hours }
2023-03-07T13:03:01.360+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: access-setting-permissions }
2023-03-07T13:03:01.361+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: api-bypass-rate-limit }
2023-03-07T13:03:01.361+0000 continuing through error: E11000 duplicate key error collection: rocketchat.rocketchat_permissions index: id dup key: { _id: assign-roles }

Hi!

Looks like the database was not empty =\

I have check database.db file and it was 29 gb

I have fresh installed the rocket chat with docker composer. Can you please let me know how to drop the database in MongoDB with docker composer. So i initiate the restore from beginning

I have run below commands.

Dump: mongodump --archive > db.dump

docker exec -i containerID sh -c ‘mongorestore --archive’ < db.dump

Hi!

Try running mongo first, restore, then run rocketchat

if you run mongo and rocketchat, it might create the indexes before you restore it.

@dudanogueira Thank you for your help.

I have migrated the latest rocket chat but now i am facing issue high load due to mongo.

I have 4 GB ram and 2CPU. Can you please guide ?

Please find the attached .

Load issue has been resolved but i am facing another issue . I have migrate old version from abc.com to temp.abc.com. All data has been migrated but images and videos are not showing.