대량 데이터 로딩
대량 로딩 기능을 사용하면 명령줄에서 JSONL 파일의 대량 데이터를 Mattermost로 가져올 수 있습니다. 다음과 같은 데이터 유형을 가져올 수 있습니다: 대량 로딩 명령은 중단 가능하며 멱등합니다 어떤 이유로든 가져오기가 중단된 경우, 다음에 명령을 실행하면 중단된 곳에서 계속됩니다.
대량 로딩 기능을 사용하면 명령줄에서 JSONL 파일의 대량 데이터를 Mattermost로 가져올 수 있습니다. 이 기능은 기존 시스템에서 데이터를 마이그레이션하거나 신규 설치에 데이터를 미리 채워 넣는 데 가장 적합합니다.
다음과 같은 데이터 유형을 가져올 수 있습니다:
- 팀
- 스레드 토론
- 채널(공개 및 비공개)
- 사용자
- 사용자의 팀 멤버십
- 사용자의 채널 멤버십
- 사용자의 알림 기본 설정
- 사용자의 사용자 지정 상태
- 게시물(일반, 답글 아닌 게시물)
- 게시물 답글
- 게시물 반응
- 게시물 첨부 파일
- 다이렉트 메시지 및 그룹 메시지 채널
- 다이렉트 메시지 및 그룹 메시지 채널의 읽음/안읽음 상태
- 다이렉트 메시지 및 그룹 메시지
- 사용자 자신에게 보낸 다이렉트 메시지
- 권한 스킴
- 사용자 지정 이모지
- 봇 사용자
대량 로딩 명령에 대해#
대량 로딩 명령은 중단 가능하며 멱등합니다
어떤 이유로든 가져오기가 중단된 경우, 다음에 명령을 실행하면 중단된 곳에서 계속됩니다. 같은 데이터 파일로 명령을 반복 실행할 수 있으며, 데이터는 한 번만 가져와집니다. 들어오는 게시물과 타임스탬프가 일치하는 게시물의 첨부 파일은 들어오는 데이터로 교체됩니다. v5.20 이전에는 타임스탬프가 일치하는 게시물의 업데이트가 이전 게시물에 추가되었습니다.
라이브 시스템에서 대량 로딩 명령을 실행할 수 있습니다
명령을 실행하기 위해 Mattermost를 종료할 필요는 없지만, 실행 사이에 시스템 사용자가 변경한 내용은 데이터 파일에 해당 필드가 있는 경우 덮어쓰일 수 있습니다.
일부 데이터 필드는 선택 사항입니다
모든 필드가 필수는 아닙니다. 가져오는 객체에서 선택적 필드가 없는 경우, 데이터베이스의 해당 필드의 현재 값은 변경되지 않습니다.
대량 로딩 명령은 동기화 도구가 아닙니다
대량 로딩 명령을 사용하여 Mattermost 데이터베이스에서 객체나 해당 필드를 제거할 수 없습니다. 명령은 필드를 생성하거나 덮어쓰는 것만 가능합니다.
대량 로딩 명령은 mmctl에서 실행되며 mmctl의 보안 컨텍스트에서 작동합니다. 즉, Mattermost 데이터베이스의 모든 항목에 접근하고 변경할 수 있는 전체 권한을 가집니다.
데이터 대량 로드#
대량 로딩 명령을 실행하기 전에, 먼저 Mattermost 디렉터리에 가져올 데이터가 포함된 JSONL 파일을 만들어야 합니다. 파일 이름은 아무 이름이나 지정할 수 있지만, 이 예시에서는 data.jsonl 이라고 합니다. 파일 형식은 데이터 형식 섹션에 설명되어 있습니다.
다음으로, zip -r data.zip data.jsonl 명령을 실행하여 압축합니다.
mmctl 로컬 모드 사용#
Mattermost v9.5부터, 로컬 모드 의 mmctl bulk import process 명령은 서버에 업로드하지 않고 가져오기 파일을 처리하는 것을 지원합니다.
mmctl import process --bypass-upload <file>.zip --local 을 실행하여 가져오기를 시작하고 Mattermost 서버가 파일에서 직접 읽을 수 있도록 합니다.
mmctl 로컬 모드를 사용하지 않는 경우#
mmctl 명령을 로컬 모드로 실행하지 않는 경우:
- mmctl import upload 명령을 실행하여 ZIP 파일을 데이터베이스에 업로드합니다. 예:
mmctl import upload data.zip. 업로드 후 두 개의 ID가 반환됩니다. 첫 번째 줄에는 업로드 세션 ID가, 두 번째 줄에는 파일 이름이 포함됩니다. - mmctl import list available 명령을 실행하여 파일이 업로드되어 사용 준비가 되었는지 확인합니다.
- mmctl import process 명령을 업로드 세션 ID(파일 이름이 아님)로 실행하여 업로드된 파일을 가져옵니다. 예:
mmctl import process <upload_session_id>_data.zip, 여기서<upload_session_id>는 업로드 명령에서 반환된 업로드 세션 ID입니다.
데이터 형식#
입력 데이터 파일은 유효한 JSONL 파일이어야 하며, 파일의 각 줄에 다음 객체들이 나열된 순서대로 포함되어야 합니다.
Version
필수. Version 객체는 파일의 첫 번째 줄이어야 하며, 한 번만 나타나야 합니다. 버전은 현재1 인 대량 임포터 도구의 버전입니다.
Scheme
선택 사항. 있는 경우, Scheme 객체는 Version 객체 다음에, 모든 Team 객체 이전에 나타나야 합니다.Emoji
선택 사항. 있는 경우, Emoji 객체는 Version 객체 다음에, 모든 Team 객체 이전에 나타나야 합니다.Team
선택 사항. 있는 경우, Team 객체는 모든 Scheme 객체 다음에, 모든 Channel 객체 이전에 나타나야 합니다.Channel
선택 사항. 있는 경우, Channel 객체는 모든 Team 객체 다음에, 모든 User 객체 이전에 나타나야 합니다.User
선택 사항. 있는 경우, User 객체는 파일에서 Team 및 Channel 객체 다음에, 모든 Post 객체 이전에 나타나야 합니다. 각 User 객체는 사용자가 멤버인 팀 및 채널을 정의합니다. 해당 팀과 채널이 데이터 파일에 없는 경우, Mattermost 데이터베이스에 존재해야 합니다.Post
선택 사항. 있는 경우, Post 객체는 마지막 User 객체 다음에, 모든 DirectChannel 객체 이전에 나타나야 합니다. 각 Post 객체는 팀, 채널, 메시지를 게시한 사용자의 사용자명을 정의합니다. 해당 팀, 채널 또는 사용자가 데이터 파일에 없는 경우, Mattermost 데이터베이스에 존재해야 합니다.DirectChannel
선택 사항. 있는 경우, DirectChannel 객체는 파일의 모든 Post 객체 다음에, 모든 DirectPost 객체 이전에 나타나야 합니다.DirectPost
선택 사항. 있는 경우, DirectPost 객체는 파일의 모든 다른 객체 다음에 나타나야 합니다. 각 DirectPost 객체는 채널 멤버들의 사용자명과 메시지를 게시한 사용자의 사용자명을 정의합니다. 해당 사용자명이 데이터 파일에 없는 경우, Mattermost 데이터베이스에 존재해야 합니다.Version 객체를 제외하고, 각 객체는 해당 객체의 고유 식별자로 사용되는 필드 또는 필드 조합을 가집니다. 대량 로더는 고유 식별자를 사용하여 가져오는 객체가 새 객체인지 기존 객체의 업데이트인지 결정합니다.
각 객체의 식별자는 다음 표에 나열되어 있습니다:
| 객체 | 고유 식별자 |
|---|---|
| Version | 해당 없음 |
| Scheme | name |
| Role | name |
| Emoji | name |
| Team | name |
| Channel | name, team |
| User | username |
| UserNotifyProps | username |
| UserTeamMembership | team, username |
| UserChannelMembership | team, channel, username |
| Post | channel, message, create_at |
| Reply | post, message, create_at |
| Reaction | post, emoji_name, create_at |
| Attachment | path |
| DirectChannel | members |
| DirectPost | channel_members, user, message, create_at |
다음은 두 팀, 각 팀에 두 채널, 많은 사용자 및 게시물을 가져오는 파일의 일부입니다.
:linenos:
{ "type": "version", ... }
{ "type": "team", "team": { "name": "TeamA", ...} }
{ "type": "team", "team": { "name": "TeamB", ...} }
{ "type": "channel", "channel": { "team": "TeamA", "name": "channel_a1", ...} }
{ "type": "channel", "channel": { "team": "TeamA", "name": "channel_a2", ...} }
{ "type": "channel", "channel": { "team": "TeamB", "name": "channel_b1", ...} }
{ "type": "channel", "channel": { "team": "TeamB", "name": "channel_b2", ...} }
{ "type": "user", "user": { "username": "user001", ...} }
{ "type": "user", "user": { "username": "user002", ...} }
{ "type": "user", "user": { "username": "user003", ...} }
{ "type": "user", ... }
{ "type": "user", ... }
{ "type": "user", ... }
.
.
.
{ "type": "post", { "team": "TeamA", "name": "channel_a1", "user": "user001", ...} }
{ "type": "post", { "team": "TeamA", "name": "channel_a1", "user": "user001", ...} }
{ "type": "post", { "team": "TeamA", "name": "channel_a1", "user": "user001", ...} }
.
.
.
<h2 id="version-객체">Version 객체</h2>
<p>Version 객체는 데이터 파일의 첫 번째 객체여야 하며, 한 번만 나타날 수 있습니다. 버전은 대량 가져오기 도구의 버전을 나타내며, 현재 <code>1</code> 입니다.
Version 객체 예시#
명확성을 위해 객체는 일반 JSON 형식으로 표시되지만, 데이터 파일에서는 여러 줄에 걸쳐 쓸 수 없습니다. 반드시 한 줄에 모두 작성해야 합니다.
{
"type": "version",
"version": 1
}
Version 객체의 필드#
| Field name | Type | Description | Validated | Mandatory |
|---|---|---|---|---|
| type | string | Must be the string "version" | Yes | Yes |
| version | number | Must be the number 1. | Yes | Yes |
Scheme 객체#
Scheme 객체는 Mattermost 권한 시스템의 권한 스킴을 나타냅니다. 있는 경우, Scheme 객체는 Version 객체 다음에, 모든 Team 객체 이전에 나타나야 합니다.
Scheme 객체 예시#
명확성을 위해 객체는 일반 JSON 형식으로 표시되지만, 데이터 파일에서는 여러 줄에 걸쳐 쓸 수 없습니다. 반드시 한 줄에 모두 작성해야 합니다.
{
"type": "scheme",
"scheme": {
"name": "custom_scheme_name",
"display_name": "Custom Scheme Name",
"description": "This is a custom override scheme.",
"scope": "team",
"default_team_admin_role": {
"name": "custom_scheme_team_admin_role",
"display_name": "Custom Scheme Team Admin Role",
"description": "This is the default team admin role for the custom scheme.",
"permissions": ["add_user_to_team", "manage_team_roles"],
},
"default_team_user_role": {
"name": "custom_scheme_team_user_role",
"display_name": "Custom Scheme Team User Role",
"description": "This is the default team user role for the custom scheme.",
"permissions": ["create_public_channel", "create_private_channel"],
},
"default_channel_admin_role": {
"name": "custom_scheme_channel_admin_role",
"display_name": "Custom Scheme Channel Admin Role",
"description": "This is the default channel admin role for the custom scheme.",
"permissions": ["manage_private_channel_members", "manage_channel_roles"],
},
"default_channel_user_role": {
"name": "custom_scheme_channel_user_role",
"display_name": "Custom Scheme Channel User Role",
"description": "This is the default channel user role for the custom scheme.",
"permissions": ["manage_public_channel_members", "manage_public_channel_properties"],
},
}
}
Scheme 객체의 필드#
| Field name | Type | Description | Validated | Mandatory |
|---|---|---|---|---|
| name | string | The scheme name. Must start with and contain only lowercase letters ([a-z0-9]) or _, and must be between 2-64 characters in length. | Yes | Yes |
| display_name | string | The display name for the scheme. | Yes | Yes |
| scope | string | The scope for the scheme. Must be either "team" or "channel". | Yes | Yes |
| description | string | The description of the scheme. | Yes | No |
| default_team_admin_role | Role object | The default role applied to team admins in teams using this scheme. This field is mandatory if the scheme scope is set to "team", otherwise must not be present. | Yes | No |
| default_team_user_role | Role object | The default role applied to Team Users in teams using this scheme. This field is mandatory if the scheme scope is set to "team", otherwise must not be present. | Yes | No |
| default_channel_admin_role | Role object | The default role applied to channel admins in channels using this scheme. This field is mandatory for both "team" and "channel" scope schemes. | Yes | Yes |
| default_channel_user_role | Role object | The default role applied to Channel Users in channels using this scheme. This field is mandatory for both "team" and "channel" scope schemes. | Yes | Yes |
Role 객체의 필드#
이 객체는 Scheme 객체의 멤버입니다.
| Field name | Type | Description | Validated | Mandatory |
|---|---|---|---|---|
| name | string | The scheme name. | Yes | Yes |
| display_name | string | The display name for the scheme. | Yes | Yes |
| description | string | The description of the scheme. | Yes | No |
| permissions | array | The permissions the role should grant. This is an array of strings where the strings are the names of individual permissions in the Mattermost permissions system. | Yes | No |
Emoji 객체#
Emoji 객체는 사용자 지정 이모지를 나타냅니다. 있는 경우, Emoji 객체는 Version 객체 다음에, 모든 Team 객체 이전에 나타나야 합니다.
Emoji 객체 예시#
명확성을 위해 객체는 일반 JSON 형식으로 표시되지만, 데이터 파일에서는 여러 줄에 걸쳐 쓸 수 없습니다. 반드시 한 줄에 모두 작성해야 합니다.
{
"type": "emoji",
"emoji": {
"name": "custom-emoji-troll",
"image": "bulkdata/emoji/trollolol.png"
}
}
Emoji 객체의 필드#
| Field name | Type | Description | Validated | Mandatory |
|---|---|---|---|---|
| name | string | The emoji name. | Yes | Yes |
| image | string | The path (either absolute or relative to the current working directory) to the image file for this emoji. | No | Yes |
Team 객체#
있는 경우, Team 객체는 Version 객체 다음에, 모든 Channel 객체 이전에 나타나야 합니다.
Team 객체 예시#
명확성을 위해 객체는 일반 JSON 형식으로 표시되지만, 데이터 파일에서는 여러 줄에 걸쳐 쓸 수 없습니다. 반드시 한 줄에 모두 작성해야 합니다.
{
"type": "team",
"team": {
"name": "team-name",
"display_name": "Team Display Name",
"type": "O",
"description": "The Team Description",
"allow_open_invite": true
}
}
Team 객체의 필드#
| [1] Not validated, but an error occurs if no such scheme exists when running in apply mode. | ||||
| Field name | Type | Description | Validated | Mandatory |
|---|---|---|---|---|
| name | string | The team name. | Yes | Yes |
| display_name | string | The display name for the team. | Yes | Yes |
| type | string | The type of team. Can have one the following values: O for an open team I for an invite-only team. |
Yes | Yes |
| description | string | The team description. | Yes | No |
| allow_open_invite | bool | Whether to allow open invitations. Must have one of the following values: true false |
Yes | No |
| scheme | string | The name of the Scheme that should be applied to this team. | No [1] | No |
Channel 객체#
있는 경우, Channel 객체는 모든 Team 객체 다음에, 모든 User 객체 이전에 나타나야 합니다.
Channel 객체 예시#
명확성을 위해 객체는 일반 JSON 형식으로 표시되지만, 데이터 파일에서는 여러 줄에 걸쳐 쓸 수 없습니다. 반드시 한 줄에 모두 작성해야 합니다.
{
"type": "channel",
"channel": {
"team": "team-name",
"name": "channel-name",
"display_name": "Channel Name",
"type": "O",
"header": "The Channel Header",
"purpose": "The Channel Purpose",
}
}
Channel 객체의 필드#
| [1] Not validated, but an error occurs if no such team/scheme exists when running in apply mode. | ||||
| Field name | Type | Description | Validated | Mandatory |
|---|---|---|---|---|
| team | string | The name of the team this channel belongs to. | No [1] | Yes |
| name | string | The name of the channel. Must start with and contain only lowercase letters ([a-z0-9]) or - or _. | Yes | Yes |
| display_name | string | The display name for the channel. | Yes | yes |
| type | string | The type of channel. Can have one the following values: O for a public channel. P for a private channel. |
Yes | Yes |
| header | string | The channel header. | Yes | No |
| purpose | string | The channel purpose. | Yes | No |
| scheme | string | The name of the Scheme that should be applied to this team. | No [1] | No |
User 객체#
있는 경우, User 객체는 파일에서 Team 및 Channel 객체 다음에, 모든 Post 객체 이전에 나타나야 합니다.
User 객체 예시#
명확성을 위해 객체는 일반 JSON 형식으로 표시되지만, 데이터 파일에서는 여러 줄에 걸쳐 쓸 수 없습니다. 반드시 한 줄에 모두 작성해야 합니다.
{
"type": "user",
"user": {
"profile_image": "profile-picture.png",
"username": "username",
"email": "email@example.com",
"auth_service": "",
"password": "passw0rd",
"nickname": "bobuser",
"first_name": "Bob",
"last_name": "User",
"position": "Senior Developer",
"roles": "system_user",
"locale": "pt_BR",
"teams": [
{
"name": "team-name",
"theme": "{
\"awayIndicator\":\"#DBBD4E\",
\"buttonBg\":\"#23A1FF\",
\"buttonColor\":\"#FFFFFF\",
\"centerChannelBg\":\"#ffffff\",
\"centerChannelColor\":\"#333333\",
\"codeTheme\":\"github\",
\"linkColor\":\"#2389d7\",
\"mentionBg\":\"#2389d7\",
\"mentionColor\":\"#ffffff\",
\"mentionHighlightBg\":\"#fff2bb\",
\"mentionHighlightLink\":\"#2f81b7\",
\"newMessageSeparator\":\"#FF8800\",
\"onlineIndicator\":\"#7DBE00\",
\"sidebarBg\":\"#fafafa\",
\"sidebarHeaderBg\":\"#3481B9\",
\"sidebarHeaderTextColor\":\"#ffffff\",
\"sidebarText\":\"#333333\",
\"sidebarTextActiveBorder\":\"#378FD2\",
\"sidebarTextActiveColor\":\"#111111\",
\"sidebarTextHoverBg\":\"#e6f2fa\",
\"sidebarUnreadText\":\"#333333\",
}",
"roles": "team_user team_admin",
"channels": [
{
"name": "channel-name",
"roles": "channel_user",
"notify_props": {
"desktop": "default",
"mark_unread": "all"
}
}
]
}
]
}
}
User 객체의 필드#
| Field name | Type | Description | Validated | Mandatory |
|---|---|---|---|---|
| profile_image | string | The user's profile image. This must be an existing file path. | Yes | No |
| username | string | The user's username. This is the unique identifier for the user. | Yes | Yes |
| string | The user's email address. | Yes | Yes | |
| auth_service | string | The authentication service to use for this user account. If not provided, it defaults to password-based authentication. Must be one of the following values: "" or not provided - password authentication. "gitlab" - GitLab authentication. "ldap" - LDAP authentication (Enterprise and Professional) "saml" - Generic SAML based authentication (Enterprise) "google" - Google OAuth authentication (Enterprise) "office365" - Microsoft Entra ID OAuth Authentication (Enterprise) |
No | No |
| auth_data | string | The authentication data if auth_service is used. The value depends on the auth_service that is specified. The data comes from the following fields for the respective auth_services: "" or not provided - must be omitted. "gitlab" - The value of the Id attribute provided in the GitLab auth data. "ldap" - The value of the LDAP attribute specified as the "ID Attribute" in the Mattermost LDAP configuration. "saml" - The value of the SAML Email address attribute. "google" - The value of the OAuth Id attribute. "office365" - The value of the OAuth Id attribute. |
No | No |
| password | string | A password for the user. Can be present only when password-based authentication is used. When password-based authentication is used and the password is not present, the bulk loader generates a password. | Yes | No |
| nickname | string | The user's nickname. | Yes | No |
| first_name | string | The user's first name. | Yes | No |
| last_name | string | The user's last name. | Yes | No |
| position | string | The user's position. | Yes | No |
| roles | string | The user's roles. Must be one of the following values: "system_user" "system_admin system_user" |
Yes | No |
| locale | string | The user's locale. This must be a valid locale for which Mattermost has been localised. | No | No |
| delete_at | int64 | Timestamp for when the user was deactivated. | No | No |
| teams | array | The teams which the user will be made a member of. Must be an array of UserTeamMembership objects. | Yes | No |
| theme | string | The user's theme. Formatted as a Mattermost theme string. | No | No |
| military_time | string | How times should be displayed to this user. Must be one of the following values: "true" - Use 24 hour clock. "false" - Use 12 hour clock. |
No | No |
| collapse_previews | string | Whether to collapse or expand link previews by default. Must be one of the following values: "true" - Collapsed by default. "false" - Expanded by default. |
No | No |
| message_display | string | Which style to use for displayed messages. Must be one of the following values: "clean" - Use the standard style. "compact" - Use the compact style. |
No | No |
| channel_display_mode | string | How to display channel messages. Must be one of the following values: "full" - Use the full width of the screen. "centered" - Use a fixed width, centered block. |
No | No |
| tutorial_step | string | Where to start the user tutorial. Must be one of the following values: "1", "2" or "3" - Start from the specified tutorial step. "999" - Skip the user tutorial. |
No | No |
| use_markdown_preview | bool | Enable preview of message markdown formatting. Can have one the following values: "True" "False" |
Yes | Yes |
| use_formatting | bool | Enable post formatting for links, emoji, text styles and line breaks. Can have one the following values: "True" "False" |
Yes | Yes |
| show_unread_section | bool | Enable showing unread messages at top of channel sidebar. Can have one the following values: "True" "False" |
Yes | Yes |
| email_interval | string | Specify an email batching interval during bulk import. Can have one of the following values: "immediately" - Emails are sent immediately. "fifteen" - Emails are batched and sent every 15 minutes. "hour" - Emails are batched and sent every hour. |
Yes | Yes |
| notify_props | UserNotifyProps object | The user's notify preferences, as defined by the UserNotifyProps object. | Yes | No |
UserNotifyProps 객체의 필드#
이 객체는 User 객체의 멤버입니다.
| [1] Not validated, but an error occurs if no such team exists when running in apply mode. | ||||
| Field name | Type | Description | Validated | Mandatory |
|---|---|---|---|---|
| desktop | string | Preference for sending desktop notifications. Must be one of the following values: "all" - For all activity. "mention" - Only for mentions. "none" - Never. |
Yes | No |
| desktop_sound | string | Preference for whether desktop notification sound is played. Must be one of the following values: "true" - Sound is played. "false" - Sound is not played. |
Yes | No |
| string | Preference for email notifications. Must be one of the following values: "true" - Email notifications are sent based on the email_interval setting "false" - Email notifications are not sent. |
No | No | |
| mobile | string | Preference for sending mobile push notifications. Must be one of the following values: "all" - For all activity. "mention" - Only for mentions. "none" - Never. |
Yes | No |
| mobile_push_status | string | Preference for when push notifications are triggered. Must be one of the following values: "online" - When online, away or offline. "away" - When away or offline. "offline" - When offline. |
Yes | No |
| channel | string | Whether @all, @channel and @here trigger mentions. Must be one of the following values: "true" - Mentions are triggered. "false" - Mentions are not triggered. |
Yes | No |
| comments | string | Preference for reply mention notifications. Must be one of the following values: "any" - Trigger notifications on messages in reply threads that the user starts or participates in. "root" - Trigger notifications on messages in threads that the user starts. "never" - Do not trigger notifications on messages in reply threads unless the user is mentioned. |
Yes | No |
| mention_keys | string | Preference for custom non-case sensitive words that trigger mentions. Words must be separated by commas. | No | No |
UserTeamMembership 객체의 필드#
이 객체는 User 객체의 멤버입니다.
| [1] Not validated, but an error occurs if no such team exists when running in apply mode. | ||||
| Field name | Type | Description | Validated | Mandatory |
|---|---|---|---|---|
| name | string | The name of the team this user should be a member of. | No [1] | Yes |
| theme | string | The user's theme for the specified team. Formatted as a Mattermost theme string. | Yes | No |
| roles | string | The roles the user should have within this team. Must be one of the following values: "team_user" "team_admin team_user" |
Yes | No |
| channels | array | The channels within this team that the user should be made a member of. Must be an array of UserChannelMembership objects. | Yes | No |
UserChannelMembership 객체의 필드#
이 객체는 TeamMembership 객체의 멤버입니다.
| [1] Not validated, but an error occurs if the parent channel does not exist when running in apply mode. | ||||
| Field name | Type | Description | Validated | Mandatory |
|---|---|---|---|---|
| name | string | The name of the channel in the parent team that this user should be a member of. | No [1] | Yes |
| roles | string | The roles the user should have within this channel. Must be one of the following values: "channel_user" "channel_user channel_admin" |
Yes | No |
| notify_props | object | The notify preferences for this user in this channel. Must be a ChannelNotifyProps object | Yes | No |
| favorite | boolean | Whether to favorite the channel. Must be one of the following values: "true" - Yes. "false" - No. |
No | No |
ChannelNotifyProps 객체의 필드#
이 객체는 ChannelMembership 객체의 멤버입니다.
| Field name | Type | Description | Validated | Mandatory |
|---|---|---|---|---|
| desktop | string | Preference for sending desktop notifications. Must be one of the following values: "default" - Global default. "all" - For all activity. "mention" - Only for mentions. "none" - Never. |
Yes | No |
| mobile | string | Preference for sending mobile notifications. Must be one of the following values: "default" - Global default. "all" - For all activity. "mention" - Only for mentions. "none" - Never. |
Yes | No |
| mark_unread | string | Preference for marking channel as unread. Must be one of the following values: "all" - For all unread messages. "mention" - Only for mentions. |
Yes | No |
Post 객체#
있는 경우, Post 객체는 파일의 마지막 User 객체 다음에, 모든 DirectChannel 객체 이전에 나타나야 합니다.
Post 객체 예시#
명확성을 위해 객체는 일반 JSON 형식으로 표시되지만, 데이터 파일에서는 여러 줄에 걸쳐 쓸 수 없습니다. 반드시 한 줄에 모두 작성해야 합니다.
~~~~~~~~~~~~~~~~~~~~~~~~~
| [1] Not validated, but an error occurs if the team does not exist when running in apply mode. [2] Not validated, but an error occurs if the channel does not exist in the corresponding team when running in apply mode. [3] Not validated, but an error occurs if the user does not exist when running in apply mode. |
||||
| Field name | Type | Description | Validated | Mandatory |
|---|---|---|---|---|
| team | string | The name of the team that this post is in. | No [1] | Yes |
| channel | string | The name of the channel that this post is in. | No [2] | Yes |
| user | string | The username of the user for this post. | No [3] | Yes |
| message | string | The message that the post contains. | Yes | Yes |
| props | object | The props for a post. Contains additional formatting information used by integrations and bot posts. For a more detailed explanation see the message attachments documentation. | Yes | Yes |
| create_at | int | The timestamp for the post, in milliseconds since the Unix epoch. | Yes | Yes |
| flagged_by | array | Must contain a list of members who have flagged the post. | No | No |
| replies | array | The posts in reply to this post. Must be an array of Reply objects. | Yes | No |
| reactions | array | The emoji reactions to this post. Must be an array of Reaction objects. | Yes | No |
| attachments | array | File attachments associated with this post. Must be an array of Attachment objects. | Yes | No |
Reply 객체의 필드#
이 객체는 Post/DirectPost 객체의 멤버입니다.
| Field name | Type | Description | Validated | Mandatory |
|---|---|---|---|---|
| user | string | The username of the user for this reply. | No [3] | Yes |
| message | string | The message that the reply contains. | Yes | Yes |
| create_at | int | The timestamp for the reply, in milliseconds since the Unix epoch. | Yes | Yes |
| flagged_by | array | Must contain a list of members who have flagged the post. | No | No |
| reactions | array | The emoji reactions to this post. Must be an array of Reaction objects. | Yes | No |
| attachments | array | The file attachments to this post. Must be an array of Attachment objects. | Yes | No |
Reaction 객체의 필드#
이 객체는 Post/DirectPost 객체의 멤버입니다.
| Field name | Type | Description | Validated | Mandatory |
|---|---|---|---|---|
| user | string | The username of the user for this reply. | No [3] | Yes |
| emoji_name | string | The emoji of the reaction. | Yes | Yes |
| create_at | int | The timestamp for the reply, in milliseconds since the Unix epoch. | Yes | Yes |
Attachment 객체의 필드#
이 객체는 Post/DirectPost 객체의 멤버입니다.
| [1] Not validated, but an error occurs if the file path is not found or accessible when running in apply mode. | ||||
| Field name | Type | Description | Validated | Mandatory |
|---|---|---|---|---|
| path | string | The path to the file to be attached to the post. | No [1] | Yes |
DirectChannel 객체#
다이렉트 채널에는 최소 2명에서 최대 8명의 멤버가 있을 수 있습니다. 멤버가 두 명뿐인 경우 Mattermost는 이를 다이렉트 메시지 채널로 처리합니다. 멤버가 세 명 이상인 경우 Mattermost는 이를 그룹 메시지 채널로 처리합니다.
DirectChannel 객체 예시#
명확성을 위해 객체는 일반 JSON 형식으로 표시되지만, 데이터 파일에서는 여러 줄에 걸쳐 쓸 수 없습니다. 반드시 한 줄에 모두 작성해야 합니다.
{
"type": "direct_channel",
"direct_channel": {
"members": [
"username1",
"username2",
"username3"
],
"header": "The Channel Header",
"favorited_by": [
"username1",
"username2",
"username3"
]
}
}
DirectChannel 객체의 필드#
| [1] Not validated, but an error occurs if one or more of the users don't exist when running in apply mode. | ||||
| Field name | Type | Description | Validated | Mandatory |
|---|---|---|---|---|
| members | array | Must contain a list of members, with a minimum of two usernames and a maximum of eight usernames. | No [1] | Yes |
| header | string | The channel header. | Yes | No |
| favorited_by | array | Must contain a list of members who have favorited the channel. | No | No |
DirectPost 객체#
DirectPost 객체는 파일의 다른 모든 객체 다음에 나타나야 합니다.
DirectPost 객체 예시#
명확성을 위해 객체는 일반 JSON 형식으로 표시되지만, 데이터 파일에서는 여러 줄에 걸쳐 쓸 수 없습니다. 반드시 한 줄에 모두 작성해야 합니다.
{
"type": "direct_post",
"direct_post": {
"channel_members": [
"username1",
"username2",
"username3",
],
"user": "username2",
"message": "Hello Group Channel",
"create_at": 140012340013,
"flagged_by": [
"username1",
"username2",
"username3"
],
"replies": [{
"user": "username4",
"message": "The reply message",
"create_at": 140012352049,
}, {
"user": "username5",
"message": "Other reply message",
"create_at": 140012353057,
}],
"reactions": [{
"user": "username6",
"emoji_name": "+1",
"create_at": 140012356032,
}, {
"user": "username7",
"emoji_name": "heart",
"create_at": 140012359034,
}]
}
}
DirectPost 객체의 필드#
| [1] Not validated, but an error occurs if no channels contain an identical list when running in apply mode. [2] Not validated, but an error occurs if the user does not exist when running in apply mode. |
||||
| Field name | Type | Description | Validated | Mandatory |
|---|---|---|---|---|
| channel_members | array | Must contain a list of members, with a minimum of two usernames and a maximum of eight usernames. | No [1] | Yes |
| user | string | The username of the user for this post. | No [2] | Yes |
| message | string | The message that the post contains. | Yes | Yes |
| create_at | int | The timestamp for the post, in milliseconds since the Unix epoch. | Yes | Yes |
| flagged_by | array | Must contain a list of members who have flagged the post. | No | No |
| replies | array | The posts in reply to this direct post. Must be an array of Reply objects. | Yes | No |
| reactions | array | The emoji reactions to this direct post. Must be an array of Reaction objects. | Yes | No |
| attachments | array | The attachments to this direct post. Must be an array of Attachment objects. | Yes | No |
일반적인 문제#
대량 가져오기 명령은 mattermost 사용자로 실행하세요. root 또는 다른 사용자로 실행하면 가져온 첨부 파일의 파일 권한에 문제가 발생합니다.
파일 첨부가 활성화 되어 있는지, 들어오는 첨부 파일을 지원할 수 있는 충분한 여유 공간이 파일 저장소 시스템 에 있는지, 최대 파일 크기 가 적절하게 설정되어 있는지 확인하세요.
Mattermost 서버의 로그에도 충분한 여유 공간이 있는지, 그리고 데이터베이스 서버에 데이터베이스 자체와 트랜잭션 로그를 위한 여유 공간이 있는지 확인하세요.
잘못 구성된 경우 첨부 파일 업로드를 차단하고 가져오기 실패를 유발할 수 있는 바이러스 백신 또는 다른 플러그인을 비활성화하세요. 바이러스 백신 스캔이 필요한 경우 가져오기 전에 첨부 파일 폴더를 스캔하세요.
문제 해결#
대량 로딩 도구 실행이 중단되고 완료되지 않는 경우#
Bleve 검색 인덱싱이 활성화되어 있는 경우, System Console > Experimental > Bleve 에서 일시적으로 비활성화하고 명령을 다시 실행하세요.
Bleve는 여러 프로세스가 동일한 인덱스를 열고 조작하는 것을 지원하지 않습니다. 따라서 Mattermost 서버가 실행 중인 경우, 대량 로딩 도구 실행을 시도하면 인덱스를 열려고 할 때 잠금이 발생합니다.
