From e68b1989b3a096c0f3045e8b1796f89dbdd4330c Mon Sep 17 00:00:00 2001 From: Priyansh Garg Date: Sun, 25 Jul 2021 03:09:05 +0530 Subject: [PATCH] data_import: Document Rocket.Chat import tool. --- templates/zerver/create_realm.html | 4 +- templates/zerver/features.html | 2 +- templates/zerver/for-research.html | 2 +- templates/zerver/for/communities.md | 5 +- templates/zerver/for/open-source.md | 7 +- .../zerver/help/import-from-rocketchat.md | 101 ++++++++++++++++++ .../zerver/help/include/sidebar_index.md | 1 + tools/linter_lib/custom_check.py | 1 + 8 files changed, 114 insertions(+), 9 deletions(-) create mode 100644 templates/zerver/help/import-from-rocketchat.md diff --git a/templates/zerver/create_realm.html b/templates/zerver/create_realm.html index c3ff884554..202d946009 100644 --- a/templates/zerver/create_realm.html +++ b/templates/zerver/create_realm.html @@ -34,8 +34,8 @@ {% endif %}
Or import - from Slack, Mattermost - or Gitter. + from Slack, Mattermost, + Gitter, or Rocket.Chat.
diff --git a/templates/zerver/features.html b/templates/zerver/features.html index e7749cb302..32da93d29e 100644 --- a/templates/zerver/features.html +++ b/templates/zerver/features.html @@ -251,7 +251,7 @@

DATA IMPORT

- Import an existing Slack, Mattermost or Gitter workspace into Zulip. + Import an existing Slack, Mattermost, Gitter or Rocket.Chat workspace into Zulip.

diff --git a/templates/zerver/for-research.html b/templates/zerver/for-research.html index aeaefd21a2..e0cbd8607d 100644 --- a/templates/zerver/for-research.html +++ b/templates/zerver/for-research.html @@ -333,7 +333,7 @@ conferences. -
  • Getting started or moving from another platform is easy! Import your existing organization from Slack, Mattermost, or Gitter.
  • +
  • Getting started or moving from another platform is easy! Import your existing organization from Slack, Mattermost, Gitter, or Rocket.Chat.
  • Fully customizable notifications let participants keep an eye on the discussions they care about.
  • If you have any questions, please contact us at sales@zulip.com. You can also drop by our friendly developer community at chat.zulip.org to ask for help or suggest improvements!
  • diff --git a/templates/zerver/for/communities.md b/templates/zerver/for/communities.md index 5ff3db5991..149dafbaa4 100644 --- a/templates/zerver/for/communities.md +++ b/templates/zerver/for/communities.md @@ -127,8 +127,9 @@ improvements into Zulip. Many communities that migrated from [Slack](/help/import-from-slack), -[Mattermost](/help/import-from-mattermost), or -[Gitter](/help/import-from-gitter) to Zulip tell us +[Mattermost](/help/import-from-mattermost), +[Gitter](/help/import-from-gitter), or +[Rocket.Chat](/help/import-from-rocketchat) to Zulip tell us that Zulip helped them manage and grow an inclusive, healthy community. We hope Zulip can help your community succeed too! diff --git a/templates/zerver/for/open-source.md b/templates/zerver/for/open-source.md index 2411cd3b6a..05b2a5480b 100644 --- a/templates/zerver/for/open-source.md +++ b/templates/zerver/for/open-source.md @@ -120,11 +120,12 @@ account](/help/configure-authentication-methods), instead of with a username and password. [github-auth]: https://github.com/zulip/zulip/blob/7e9926233/zproject/prod_settings_template.py#L112 -### Import from Slack, Mattermost, or Gitter. +### Import from Slack, Mattermost, Gitter, or Rocket.Chat. Import your existing organization from [Slack](/help/import-from-slack), -[Mattermost](/help/import-from-mattermost), or -[Gitter](/help/import-from-gitter). +[Mattermost](/help/import-from-mattermost), +[Gitter](/help/import-from-gitter), or +[Rocket.Chat](/help/import-from-rocketchat). ### Collaborate on code and formulas diff --git a/templates/zerver/help/import-from-rocketchat.md b/templates/zerver/help/import-from-rocketchat.md new file mode 100644 index 0000000000..b67af6fcd4 --- /dev/null +++ b/templates/zerver/help/import-from-rocketchat.md @@ -0,0 +1,101 @@ +# Import from Rocket.Chat + +Starting with Zulip 5.0, Zulip supports importing data from Rocket.Chat, +including users, teams, channels, discussions, messages, and more. + +**Note:** You can only import a Rocket.Chat workspace as a new Zulip +organization. In particular, you cannot use this tool to import data +into an existing Zulip organization. + +## Import from Rocket.Chat + +First, you need to export your data from Rocket.Chat. Rocket.Chat does +not provide an official data export feature, so the Zulip import tool +works by importing data from a Rocket.Chat database dump. + +If you're self-hosting your Rocket.Chat instance, you can create a +database dump using the `mongodump` utility. + +If your organization is hosted on Rocket.Chat Cloud or another hosting +provider that doesn't provide you with database access, you will need +to request a database dump by contacting their support. + +In either case, you should end up with a directory containing many +`.bson` files. + +### Import into Zulip Cloud + +Email support@zulip.com with your database dump and your desired +Zulip subdomain. Your imported organization will be hosted at +`.zulipchat.com`. + +If you've already created a test organization at +`.zulipchat.com`, let us know, and we can rename the old +organization first. + +### Import into a self-hosted Zulip server + +First [install a new Zulip +server](https://zulip.readthedocs.io/en/stable/production/install.html) +with Zulip 5.0 or newer, skipping "Step 3: Create a Zulip +organization, and log in" (you'll create your Zulip organization via +the data import tool instead). + +Now, get the directory containing all the `bson` files in your database +dump and save it inside `/home/zulip/rocketchat` on your Zulip server and rename it +to `rocketchat` (the directory at `/home/zulip/rocketchat` should contain +all the `bson` files). + +Log in to a shell on your Zulip server as the `zulip` user. To import with +the most common configuration, run the following commands: + +``` +cd /home/zulip/deployments/current +./scripts/stop-server +./manage.py convert_rocketchat_data /home/zulip/rocketchat --output /home/zulip/converted_rocketchat_data +./manage.py import "" /home/zulip/converted_rocketchat_data +./scripts/start-server +``` + +This could take a few seconds to several minutes to run, depending on how +much data you're importing. The server stop/restart is only necessary +when importing on a server with minimal RAM, where an OOM kill might +otherwise occur. + +**Import options** + +The commands above create an imported organization on the root domain +(`EXTERNAL_HOST`) of the Zulip installation. You can also import into a +custom subdomain, e.g. if you already have an existing organization on the +root domain. Replace the last line above with the following, after replacing +`` with the desired subdomain. + +``` +./manage.py import /home/zulip/converted_rocketchat_data +``` + +{!import-login.md!} + +[upgrade-zulip-from-git]: https://zulip.readthedocs.io/en/latest/production/upgrade-or-modify.html#upgrading-from-a-git-repository + +## Caveats + +This import tool is currently beta and does not support importing +the following data: + +- Custom emoji +- User avatars +- Uploaded files +- Default channels for new users +- Wildcard mentions such as `@all` and `@here` are not converted. +- Starred messages +- Threads as separate topics +- Messages longer than Zulip's limit of 10,000 characters. + +Additionally, because Rocket.Chat does not provide a stable data +export API, the import tool may require small changes from time to +time to account for changes in the Rocket.Chat database format. +Please [contact us](/help/contact-support) if you counter any problems +using this tool. + +[upgrade-zulip-from-git]: https://zulip.readthedocs.io/en/latest/production/upgrade-or-modify.html#upgrading-from-a-git-repository diff --git a/templates/zerver/help/include/sidebar_index.md b/templates/zerver/help/include/sidebar_index.md index 097445fa7a..23b7e0d1f0 100644 --- a/templates/zerver/help/include/sidebar_index.md +++ b/templates/zerver/help/include/sidebar_index.md @@ -116,6 +116,7 @@ * [Import from Mattermost](/help/import-from-mattermost) * [Import from Slack](/help/import-from-slack) * [Import from Gitter](/help/import-from-gitter) +* [Import from Rocket.Chat](/help/import-from-rocketchat) * [Roles and permissions](/help/roles-and-permissions) * [Set the default language for new users](/help/change-the-default-language-for-your-organization) * [Export your organization](/help/export-your-organization) diff --git a/tools/linter_lib/custom_check.py b/tools/linter_lib/custom_check.py index 247d277940..4afd9107f1 100644 --- a/tools/linter_lib/custom_check.py +++ b/tools/linter_lib/custom_check.py @@ -880,6 +880,7 @@ help_markdown_rules = RuleList( "pattern": "[a-z][.][A-Z]", "description": "Likely missing space after end of sentence", "include_only": {"templates/zerver/help/"}, + "exclude_pattern": "Rocket.Chat", }, { "pattern": r"\b[rR]ealm[s]?\b",