2018-07-25 03:46:39 +02:00
|
|
|
# Import from Gitter (beta)
|
2018-07-05 11:19:58 +02:00
|
|
|
|
|
|
|
Zulip supports importing data from Gitter, including users, channels,
|
|
|
|
messages, attachments, and avatars.
|
|
|
|
|
2018-07-25 04:22:41 +02:00
|
|
|
**Note:** You can only import a Gitter room as a new Zulip organization. In
|
|
|
|
particular, this tool you cannot use this tool to import from Gitter into an
|
|
|
|
existing Zulip organization.
|
|
|
|
|
|
|
|
## Import from Gitter
|
|
|
|
|
|
|
|
First, export your data from Gitter.
|
2018-07-05 11:19:58 +02:00
|
|
|
|
2019-04-03 00:39:59 +02:00
|
|
|
### Export your Gitter data
|
|
|
|
|
|
|
|
{start_tabs}
|
|
|
|
|
2018-07-05 11:19:58 +02:00
|
|
|
1. [Export your Gitter data](https://github.com/minrk/archive-gitter). You will
|
|
|
|
receive json files of the public rooms that you are a part of.
|
2018-07-25 00:40:17 +02:00
|
|
|
Select the `gitter_data.json` file of the room which you want to import into
|
|
|
|
Zulip.
|
2018-07-05 11:19:58 +02:00
|
|
|
|
|
|
|
!!! warn ""
|
2020-10-23 02:43:28 +02:00
|
|
|
**Note:** You'll need a Gitter API token to export data. You can get this
|
2018-07-28 18:54:24 +02:00
|
|
|
token by following the instructions in the "**Getting Started**" section of the
|
2020-10-23 02:43:28 +02:00
|
|
|
[Gitter documentation](https://developer.gitter.im/docs/).
|
2018-07-05 11:19:58 +02:00
|
|
|
|
2019-04-03 00:39:59 +02:00
|
|
|
{end_tabs}
|
|
|
|
|
2020-06-09 00:58:42 +02:00
|
|
|
### Import into Zulip Cloud
|
2018-07-25 00:41:47 +02:00
|
|
|
|
2020-05-28 02:00:13 +02:00
|
|
|
Email support@zulip.com with `gitter_data.zip` and your desired
|
2018-07-25 04:06:54 +02:00
|
|
|
subdomain. Your imported organization will be hosted at
|
|
|
|
`<subdomain>.zulipchat.com`.
|
2018-07-25 00:41:47 +02:00
|
|
|
|
2018-09-15 00:57:06 +02:00
|
|
|
If you've already created a test organization at
|
|
|
|
`<subdomain>.zulipchat.com`, let us know, and we can rename the old
|
|
|
|
organization first.
|
|
|
|
|
2018-10-06 07:15:58 +02:00
|
|
|
### Import into a self-hosted Zulip server
|
2018-07-05 11:19:58 +02:00
|
|
|
|
2018-11-15 01:58:34 +01:00
|
|
|
First
|
|
|
|
[install a new Zulip server](https://zulip.readthedocs.io/en/stable/production/install.html),
|
|
|
|
skipping "Step 3: Create a Zulip organization, and log in" (you'll
|
|
|
|
create your Zulip organization via the data import tool instead).
|
2018-07-05 11:19:58 +02:00
|
|
|
|
2018-10-06 07:15:58 +02:00
|
|
|
Log in to a shell on your Zulip server as the `zulip` user. To import with
|
2020-10-24 00:10:40 +02:00
|
|
|
the most common configuration, run the following commands:
|
2018-07-05 11:19:58 +02:00
|
|
|
|
|
|
|
```
|
2018-10-06 07:15:58 +02:00
|
|
|
cd /home/zulip/deployments/current
|
2021-04-16 07:46:05 +02:00
|
|
|
./scripts/stop-server
|
2018-07-05 11:19:58 +02:00
|
|
|
./manage.py convert_gitter_data gitter_data.json --output converted_gitter_data
|
2018-10-06 07:15:58 +02:00
|
|
|
./manage.py import '' converted_gitter_data
|
2021-04-16 21:02:32 +02:00
|
|
|
./scripts/start-server
|
2018-07-05 11:19:58 +02:00
|
|
|
```
|
|
|
|
|
2020-05-12 22:23:17 +02:00
|
|
|
This could take 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.
|
2018-07-05 11:19:58 +02:00
|
|
|
|
2018-10-06 07:15:58 +02:00
|
|
|
**Import options**
|
2018-07-05 11:19:58 +02:00
|
|
|
|
2018-10-06 07:15:58 +02:00
|
|
|
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
|
|
|
|
`<subdomain>` with the desired subdomain.
|
2018-07-05 11:19:58 +02:00
|
|
|
|
|
|
|
```
|
2018-09-27 23:14:51 +02:00
|
|
|
./manage.py import <subdomain> converted_gitter_data
|
2018-07-05 11:19:58 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
{!import-login.md!}
|
|
|
|
|
2020-12-18 03:45:05 +01:00
|
|
|
## Create organization owners
|
2018-07-28 18:54:24 +02:00
|
|
|
|
|
|
|
The [Gitter API][gitter-api-user-data] don't contain data on which
|
|
|
|
users are administrators of the Gitter channel. As a result, all
|
|
|
|
Gitter users are imported into Zulip as normal users. You can follow
|
|
|
|
the Zulip documentation on
|
2020-12-18 03:45:05 +01:00
|
|
|
[making a user an organization owner from the terminal][grant-admin-access]
|
|
|
|
to mark the appropriate users as organization owners.
|
2018-07-28 18:54:24 +02:00
|
|
|
|
2019-11-22 02:07:17 +01:00
|
|
|
[grant-admin-access]: https://zulip.readthedocs.io/en/latest/production/management-commands.html#grant-administrator-access)
|
2018-07-28 18:54:24 +02:00
|
|
|
[gitter-api-user-data]: https://developer.gitter.im/docs/user-resource
|
|
|
|
|
2018-07-05 11:19:58 +02:00
|
|
|
## Caveats
|
|
|
|
|
2018-07-28 18:54:24 +02:00
|
|
|
- The [Gitter data export tool](https://github.com/minrk/archive-gitter)
|
2020-10-23 02:43:28 +02:00
|
|
|
doesn't support exporting private Gitter channels.
|
2018-07-28 18:54:24 +02:00
|
|
|
|
2020-07-23 01:08:42 +02:00
|
|
|
- Gitter's export tool doesn't export email addresses; just GitHub
|
|
|
|
usernames. The import tool will thus use [GitHub's generated
|
|
|
|
noreply email addresses][github-noreply] to compute the
|
|
|
|
GitHub-generated noreply email address associated with that GitHub
|
|
|
|
account, e.g.
|
|
|
|
`{github_user_id}+{github_username}@users.noreply.github.com` or
|
|
|
|
`{github_username}@users.noreply.github.com`.
|
|
|
|
|
|
|
|
Since one cannot receive email at those noreply email addresses,
|
2020-08-11 02:20:10 +02:00
|
|
|
imported users will need to use GitHub authentication to log in to
|
2020-07-23 01:08:42 +02:00
|
|
|
Zulip and will be unable to receive email notifications until they
|
|
|
|
[change their Zulip email address](/help/change-your-email-address).
|
|
|
|
|
|
|
|
- You can merge multiple Gitter channels into a single Zulip
|
|
|
|
organization using [this
|
|
|
|
tool](https://github.com/minrk/archive-gitter/pull/5).
|
2018-07-05 11:19:58 +02:00
|
|
|
|
2020-08-11 01:47:49 +02:00
|
|
|
- This tool doesn't translate Gitter's Markdown format into Zulip
|
|
|
|
format Markdown (there are a few corner cases where the syntax is
|
2020-11-18 22:02:05 +01:00
|
|
|
different). Additionally, Gitter's issue mention syntax isn't translated.
|
2018-07-25 00:40:17 +02:00
|
|
|
|
2019-10-14 21:40:48 +02:00
|
|
|
[upgrade-zulip-from-git]: https://zulip.readthedocs.io/en/latest/production/upgrade-or-modify.html#upgrading-from-a-git-repository
|
2020-07-23 01:08:42 +02:00
|
|
|
[github-noreply]: https://docs.github.com/en/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address
|