2.8 KiB
loop-etl-rocketchat
An ETL framework to migrate data from RocketChat to Loop. This utility exports data from a source RocketChat database and generates a Loop import file.
Install
-
Install Node.js Version 6.11.0 LTS or greater
-
Clone this repo
$ git clone https://git.wilix.dev/loop/loop-etl-rocketchat -
Install dependencies
$ cd loop-etl-rocketchat
$ npm install -
Run tests
$ npm test
Export RocketChat
Export supports the following entities:
- Users and roles. Only global roles are supported
- Custom emoji. File storage: FileSystem and GridFS
- Channels
- Direct channels
- RocketChat Discussions (subchannels) are partially supported, see below
- User uploads. File storage: FileSystem and GridFS
- Posts with per user flag. Channel pins are not supported by import specification.
- Replies and Reactions
RocketChat exporting
-
Copy the example config file to config.js
cp context/config.example.rocketchat.js context/config.js -
Prepare your source and target configuration
- Set
source.uploadsPathfor file uploads (user avatars and file uploads) - Set
source.customEmojiPathfor custom emojies - Set
target.filesPathfor Loop output directory
- Set
-
If you have LDAP enabled, Community version of Loop doesn't support LDAP. If you have Community version, consider configuring ldap mapping to gitlab or disable it to use default login.
Specify it in
config.js. Setldap_auth_serviceto map ldap to a Loop login service. If it's GitLab, configuregitlabwithhostandtokenregistered in Gitlab with User access. It is used for id mapping, without it Loop won't import the users and throw an error.
Before migrating to Loop, ensure you have Gitlab integration enabled in Loop and all users are present in Gitlab. -
If you used RocketChat discussions, they will migrate in separate channels with random names. You can merge discussions in parent channel with
mergeDiscussionIntoParent -
Global channel in Rocket Chat is General and in Loop - Town Square. To have only 1 global channel, the configuration provides default example in
channels.map. You can specify migration for other channels as well. -
Run migrate script with
npm run start:rocketchat -
Configure Loop (DB and Gitlab integration) before running the migration
-
Run the migration in Loop
Import
- Run the Loop import command as explained in the documentation
Based on mattermost-etl and mattermost-etl-rocketchat, both licensed under MIT.