2018-07-25 03:45:56 +02:00
|
|
|
# Import from Slack (beta)
|
2017-01-31 09:17:05 +01:00
|
|
|
|
2018-04-08 16:11:07 +02:00
|
|
|
Starting with Zulip 1.8, Zulip supports importing data from Slack,
|
|
|
|
including users, channels, messages, attachments, avatars, custom
|
|
|
|
emoji, and emoji reactions.
|
2017-01-31 09:17:05 +01:00
|
|
|
|
2018-04-18 21:27:49 +02:00
|
|
|
First, you need to do some things in Slack to setup the export:
|
|
|
|
|
2018-04-05 01:15:22 +02:00
|
|
|
1. [Export your Slack data](https://my.slack.com/services/export). You will
|
|
|
|
receive a zip file `slack_data.zip`.
|
|
|
|
|
|
|
|
!!! warn ""
|
|
|
|
**Note:** Only Slack owners and admins can export data from Slack.
|
|
|
|
See Slack's
|
|
|
|
[guide to data exports](https://get.slack.help/hc/en-us/articles/201658943-Export-data-and-message-history)
|
|
|
|
for more information.
|
|
|
|
|
|
|
|
2. [Generate a Slack API token](https://api.slack.com/custom-integrations/legacy-tokens).
|
|
|
|
|
2018-07-25 00:20:19 +02:00
|
|
|
### Import into zulipchat.com
|
|
|
|
|
2018-07-25 04:06:54 +02:00
|
|
|
Email support@zulipchat.com with `slack_data.zip`, the Slack API token
|
|
|
|
generated above, and your desired subdomain. Your imported organization will
|
|
|
|
be hosted at `<subdomain>.zulipchat.com`.
|
2018-07-25 00:20:19 +02:00
|
|
|
|
2018-04-18 21:27:49 +02:00
|
|
|
### Import into a new Zulip server
|
|
|
|
|
|
|
|
!!! warn ""
|
|
|
|
Because the Slack import tool is very new, we recommend first
|
|
|
|
upgrading your new Zulip server to the latest `master` branch,
|
|
|
|
using [upgrade-zulip-from-git][upgrade-zulip-from-git] to avoid
|
|
|
|
bugs in the earliest versions of the Slack import tool.
|
2018-04-05 01:15:22 +02:00
|
|
|
|
2018-05-25 21:09:02 +02:00
|
|
|
Log in to a shell on your Zulip server as the `zulip` user. Run the
|
|
|
|
following commands, replacing `<token>` with the value generated
|
|
|
|
above:
|
2018-04-05 01:15:22 +02:00
|
|
|
|
|
|
|
```
|
2018-04-19 19:32:58 +02:00
|
|
|
cd /home/zulip/deployments/current
|
2018-04-06 02:21:16 +02:00
|
|
|
./manage.py convert_slack_data slack_data.zip --token <token> --output converted_slack_data
|
|
|
|
./manage.py import --destroy-rebuild-database '' converted_slack_data
|
2018-04-05 01:15:22 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
!!! warn ""
|
2018-04-26 07:49:12 +02:00
|
|
|
**Warning:** This will destroy all existing data in your Zulip server
|
2018-04-05 01:15:22 +02:00
|
|
|
|
2018-04-18 21:27:49 +02:00
|
|
|
### Import into an existing Zulip server
|
2018-04-05 01:15:22 +02:00
|
|
|
|
2018-04-26 07:49:12 +02:00
|
|
|
If you already have some organizations hosted on your Zulip server,
|
|
|
|
and want to add import your Slack data as a new Zulip organization,
|
|
|
|
you can use the following procedure.
|
|
|
|
|
2018-04-05 01:15:22 +02:00
|
|
|
Log in to your Zulip server as the `zulip` user. Run the following
|
|
|
|
commands, replacing `<token>` with the value generated above, and
|
|
|
|
`<subdomain>` with the subdomain of the URL you'd like for your imported
|
|
|
|
Zulip organization.
|
|
|
|
|
|
|
|
```
|
2018-04-19 19:32:58 +02:00
|
|
|
cd /home/zulip/deployments/current
|
2018-04-06 02:21:16 +02:00
|
|
|
./manage.py convert_slack_data slack_data.zip --token <token> --output converted_slack_data
|
|
|
|
./manage.py import --import-into-nonempty <subdomain> converted_slack_data
|
2018-04-05 01:15:22 +02:00
|
|
|
```
|
|
|
|
|
2018-05-31 16:45:35 +02:00
|
|
|
{!import-login.md!}
|
2018-04-20 19:55:36 +02:00
|
|
|
|
2018-04-05 01:15:22 +02:00
|
|
|
## Caveats
|
|
|
|
|
|
|
|
- Slack doesn't export private channels or direct messages unless you pay
|
|
|
|
for Slack Plus or contact Slack support. See
|
|
|
|
[Slack's documentation](https://get.slack.help/hc/en-us/articles/204897248-Guide-to-Slack-import-and-export-tools)
|
|
|
|
for more details.
|
|
|
|
|
|
|
|
- (Slack Plus import) Private channels and direct messages are currently
|
|
|
|
not imported. We expect to address this in a future revision.
|
|
|
|
|
|
|
|
- (Slack Plus import) Message edit history is currently not imported.
|
|
|
|
|
|
|
|
- Slack doesn't export user settings or organization settings, so
|
|
|
|
you'll need to configure these manually.
|
|
|
|
|
|
|
|
- Permission hierarchy:
|
|
|
|
Slack's `Primary owner`, `owner`, and `admin` are mapped to Zulip's `Organization admin`.
|
|
|
|
Slack's `Member`, `restricted`, and `ultra restricted` are mapped to regular Zulip users.
|
|
|
|
`Channel creators` have no special permissions in Zulip.
|
|
|
|
|
|
|
|
- The "joined #channel_name" messages are not imported.
|
|
|
|
|
2018-04-18 21:27:49 +02:00
|
|
|
[upgrade-zulip-from-git]: https://zulip.readthedocs.io/en/latest/production/maintain-secure-upgrade.html#upgrading-from-a-git-repository
|