help: Update import-data-from-slack.

This commit is contained in:
Rishi Gupta 2018-04-04 16:15:22 -07:00 committed by Tim Abbott
parent c164d07baa
commit 5740af27d6
1 changed files with 65 additions and 54 deletions

View File

@ -1,64 +1,75 @@
# Import data from Slack
# Import data from Slack (beta)
{!follow-steps.md!} import data from Slack to Zulip. We support
importing data from Slack, including users, channels, messages,
attachments, avatars, custom emoji, and emoji reactions.
Zulip supports importing data from Slack, including users, channels,
messages, attachments, avatars, custom emoji, and emoji reactions.
!!! warn ""
**Note:** You need administrative rights to the Slack workspace to export data from Slack.
These instructions require shell access to the Zulip server. If you'd like
to import a Slack organization into the hosted zulipchat.com service,
contact support@zulipchat.com.
{!go-to-the.md!} [Slack's export page](https://my.slack.com/services/export) to get your
team's zipped data file.
1. [Export your Slack data](https://my.slack.com/services/export). You will
receive a zip file `slack_data.zip`.
2. Generate a Slack API legacy token using Slack's
[token generator](https://api.slack.com/custom-integrations/legacy-tokens)
to import all of the necessary data. We use this as current Slack exports don't
include user's email data, however, we still get that data from Slack's older
method of legacy tokens.
**Note:** Once Slack starts including user emails in the exports,
this extra step of using legacy tokens to get user data would no longer be
necessary.
!!! 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.
3. Convert the zip file to Zulip export format using the command
`./manage.py convert_slack_data <zip_file> <organization_name> --token
<token> --output <output_dir>`. This would generate a data file
`output_dir` in Zulip's standard data import format.
2. [Generate a Slack API token](https://api.slack.com/custom-integrations/legacy-tokens).
4. Import the converted data into a Zulip using the command
`./manage.py import --import-into-nonempty <output_dir>`
### Import into a new Zulip instance
!!! tip ""
These instructions require shell access to the Zulip server.
If you'd like to import a Slack organization into the hosted
zulipchat.com service, contact support@zulipchat.com.
Log in to your Zulip server as the `zulip` user. Run the following
commands, replacing `<token>` with the value generated above:
## Slack data elements that are not directly translated
```
cd ~/zulip
./manage.py convert_slack_data slack_data.zip '' --token <token> --output converted_slack_data
./manage.py import --destroy-rebuild-database converted_slack_data
```
- Slack's data exports only include public channels and messages to
public channels unless you pay for their Plus plan or contact Slack
support. See
[Slack documentation](https://get.slack.help/hc/en-us/articles/204897248-Guide-to-Slack-import-and-export-tools)
!!! warn ""
**Warning:** This will destroy all existing data in your Zulip instance.
### Import into an existing Zulip instance
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.
```
cd ~/zulip
./manage.py convert_slack_data slack_data.zip <subdomain> --token <token> --output converted_slack_data
./manage.py import --import-into-nonempty converted_slack_data
```
## 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.
- The Slack->Zulip converter does not yet support private channels and
private messages. We expect to address this in a future revision.
- Message edit history. Slack only exports the latest revision of edited messages.
- Permission hierarchy. They are mapped as follows
* Slack's **Primary Owner**, **Workspace Owner**, and **Workspace
Admin** users are mapped to Zulip organization administrators.
* Slack's **Member**, **Multi-Channel Guest**, and
**Single-Channel Guest** users are mapped to regular Zulip users.
* Slack's **Channel Creators** have no special permission in Zulip.
- Zulip's "default streams" work slightly differently from Slack's
"Default channels" -- new users are automatically subscribed, but
users can still unsusbcribe from them.
- Slack's phone number and skype username fields are not transferred
to Zulip. We expect in a future version to convert these to custom
profile fields.
- Zulip doesn't have an analog of Slack's "pinned attachments" feature.
- Simultaneous bold and italic formatting of a word. This is not yet supported
by Zulip's backend markdown.
- Slack's "joined #channel_name" notifications are intentionally not
transferred because they are spammy.
- Slack's data export tools don't contain details about
organization-level settings, so you'll need to configure the Zulip
organization settings manually.
- (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.
- User phone numbers and custom user profile fields are not currently
imported. We expect to address this in a future revision.
- 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.
- The import tool does not support simultaneous bold and italic
formatting of a word; we expect to address this in a future revision.