대량 내보내기 도구#
대량 로딩 기능 을 사용하여 데이터를 JSONL 파일로 내보내는 것부터 시작됩니다. 이 도구는 개념 증명용 서버를 만들고 프로덕션용으로 다른 서버를 만들었으며, 이제 개념 증명 인스턴스의 기록을 유지하고 싶을 때 유용합니다.
다음 데이터 유형을 내보낼 수 있습니다:
팀
채널 (공개, 비공개 및 다이렉트)
메시지 (일반, 답장이 아닌 메시지 및 다이렉트 메시지)
스레드 토론 및 메시지 답장
메시지 반응
사용자
고정 및 저장된 메시지를 포함한 사용자 기본 설정
사용자의 팀 멤버십
사용자의 채널 멤버십
사용자의 알림 기본 설정
커스텀 이모지
읽음/읽지 않음 상태를 포함한 다이렉트 메시지 및 그룹 메시지 채널
역할
권한 구성
봇 사용자
참고
서버의 특정 영역 내보내기, 추가 유형의 게시물 내보내기, 파일 첨부, 웹훅 및 봇 메시지와 같은 데이터 유형에 대한 구성은 아직 지원되지 않습니다. 삭제된 객체도 아직 지원되지 않습니다.
내보내기 도구에 추가 속성이나 객체를 추가하기 위한 요청은 기능 아이디어 포럼 에 기능 요청을 추가해 주세요.
대량 내보내기 데이터#
mmctl export create – attachments 명령을 실행하여 첨부 파일을 포함한 전체 내보내기 파일을 생성하세요. 자세한 내용은 Mattermost 데이터 마이그레이션 문서를 참조하세요.
작업이 실행되는 동안 mmctl export job show 명령을 실행하여 상태를 확인할 수 있습니다.
내보내기 작업 상태가 성공적일 때:
mmctl export list 명령을 실행하여 완료된 내보내기 파일의 이름을 확인하세요.
mmctl export download 명령을 실행하여 내보내기 파일을 로컬 컴퓨터로 다운로드하세요.
참고
Mattermost v6.0부터 이 명령은 Mattermost에서 데이터를 내보내는 지원되는 방식인 mmctl export commands 를 대신하여 더 이상 사용되지 않습니다.
내보내기 명령은 CLI 에서 실행됩니다. Mattermost 데이터베이스의 모든 정보에 접근할 수 있는 권한이 있습니다.
내보내기 명령을 실행하려면:
Mattermost 서버가 설치된 디렉토리로 이동하세요. Mattermost의 기본 설치에서는 디렉토리가
/opt/mattermost입니다.서버의 모든 팀에서 데이터를 추출하려면 다음 명령을 실행하세요. 파일 이름을 변경하고 절대 경로 또는 상대 경로를 지정하여 파일이 내보내지는 위치를 지정할 수 있습니다:
sudo -u mattermost bin/mattermost export bulk file.json --all-teamssudo -u mattermost bin/mattermost export bulk /home/user/bulk_data.json --all-teams지정한 위치에서 파일을 가져오세요.
모든 Mattermost 대량 내보내기 데이터 파일은 파일의 첫 번째 줄에 Version 객체로 시작합니다. 이는 내보낸 데이터가 호환되는 Mattermost 대량 가져오기 파일 형식의 버전을 나타냅니다.
Version 객체#
| Field name | Type | Description |
|---|---|---|
| type | string | The string "version" |
| version | number | The number 1. |
| info | object | Optional VersionInfo object |
VersionInfo 객체#
| Field name | Type | Description |
|---|---|---|
| generator | string | The name of the tool this export was generated with. Well known tools are: "mattermost-server" for the Mattermost Server. "mmetl" for the Slack export converter "mmetl". |
| version | string | The version of the tool this export was generated with. This may contain multiple pieces of version info, separated by spaces. The first one should be a semantic version. "7.6.0 (29bb1e53ef5a439c73065f47de2972f9bbcb09a4, enterprise: true)" is an example of such a version string. |
| created | string | The timestamp of the file creation. This should be formatted as an RFC 3339 timestamp. The nanosecond part is optional. "2022-11-22T16:40:51.019582328+01:00" |
| additional | any | Any additional information the generator wants to include into the file header. May be omitted. Be aware that the size of each line is limited to a few MiB. |
팀 객체#
| Field name | Type | Description |
|---|---|---|
| name | string | The team name. |
| display_name | string | The display name for the team. |
| type | string | The type of team. Will have one of the following values: "O" for an open team "I" for an invite-only team. |
| description | string | The team description. |
| allow_open_invite | bool | Whether to allow open invitations. Will have one of the following values: "true" "false" |
| scheme | string | The name of the permissions scheme that applies to this team. |
채널 객체#
| Field name | Type | Description |
|---|---|---|
| team | string | The name of the team this channel belongs to. |
| name | string | The name of the channel. |
| display_name | string | The display name for the channel. |
| type | string | The type of channel. Will have one the following values: "O" for a public channel. "P" for a private channel. |
| header | string | The channel header. |
| purpose | string | The channel purpose. |
| scheme | string | The name of the permissions scheme that applies to this team. |
사용자 객체#
| Field name | Type | Description |
|---|---|---|
| username | string | The user’s username. This is the unique identifier for the user. |
| string | The user’s email address. | |
| auth_service | string | The authentication service used for this user account. This field will be absent for user/password authentication. "gitlab" - GitLab authentication. "ldap" - LDAP authentication (Enterprise and Professional) "saml" - Generic SAML based authentication (Enterprise) "google" - Google OAuth authentication (Enterprise) "entra id" - Microsoft Entra ID OAuth Authentication (Enterprise) |
| 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: "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. |
| nickname | string | The user’s nickname. |
| first_name | string | The user’s first name. |
| last_name | string | The user’s last name. |
| position | string | The user’s position. |
| roles | string | The user’s roles. |
| locale | string | The user’s localization configuration. |
| use_markdown_preview | bool | "true" if the user has enabled markdown preview in the message input box. |
| use_formatting | bool | "true" if the user has enabled post formatting for links, emoji, text styles, and line breaks. |
| show_unread_section | string | "true" if the user has enabled showing unread messages at top of channel sidebar. |
| theme | string | The user’s theme. Formatted as a Mattermost theme string. |
| military_time | string | "true" if the user has enabled a 24-hour clock. "false" if using a 12-hour clock. |
| collapse_previews | string | "true" if user collapses link preview by default. "false" if user expands link previews by default. |
| message_display | string | The style the user prefers for displayed messages. Options are "clean" if the user uses the standard style or "compact" if the user uses compact style. |
| channel_display_mode | string | "full" if the users displays channel messages at the full width of the screen or "centered" if the user uses a fixed width, centered block. |
| tutorial_step | string | "1", "2", or "3" indicates which specified tutorial step to start with for the user. "999" skips the tutorial. |
| email_interval | string | Email batching interval to use during bulk import. |
| delete_at | int64 | Timestamp of when the user was deactivated. |
| teams | array | The teams which the user is member of. Is an array of UserTeamMembership objects. |
| notify_props | object | The user’s notify preferences, as defined by the UserNotifyProps object. |
UserNotifyProps object#
이 객체는 User 객체의 구성원입니다.
| Field name | Type | Description |
|---|---|---|
| desktop | string | Preference for sending desktop notifications. Will be one of the following values: "all" - For all activity. "mention" - Only for mentions. "none" - Never. |
| desktop_sound | string | Preference for whether desktop notification sound is played. Will be one of the following values: "true" - Sound is played. "false" - Sound is not played. |
| string | Preference for email notifications. Will be one of the following values: "true" - Email notifications are sent immediately. "false" - Email notifications are not sent. |
|
| mobile | string | Preference for sending mobile push notifications. Will be one of the following values: "all" - For all activity. "mention" - Only for mentions. "none" - Never. |
| mobile_push_status | string | Preference for when push notifications are triggered. Will be one of the following values: "online" - When online, away or offline. "away" - When away or offline. "offline" - When offline. |
| channel | string | Preference for whether @all, @channel, and @here trigger mentions. Will be one of the following values: "true" - Mentions are triggered. "false" - Mentions are not triggered. |
| comments | string | Preference for reply mention notifications. Will 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. |
| mention_keys | string | Preference for custom non-case sensitive words that trigger mentions. Words are separated by commas. |
UserTeamMembership object#
| Field name | Type | Description |
|---|---|---|
| name | string | The name of the team this user is a member of. |
| roles | string | The roles the user has within this team. |
| theme | string | The user’s theme for this team. Formatted as a Mattermost theme string. |
| channels | array | The channels within this team that the user is a member of. Listed as an array of UserChannelMembership objects. |
UserChannelMembership object#
| Field name | Type | Description |
|---|---|---|
| name | string | The name of the channel in the parent team that this user is a member of. |
| roles | string | The roles the user has within this channel. |
| notify_props | object | The notify preferences for this user in this channel as defined by the ChannelNotifyProps object. |
| favorite | boolean | Whether the channel is marked as a favorite for this user. Will be one of the following values: "true" - Yes. "false" - No. |
| mention_count | int64 | The mention preferences for this user in this channel as defined by the ChannelMentionCount object. |
| mention_count_root | int64 | The mention preferences for this user in this channel as defined by the ChannelMentionCountRoot object. |
| urgent_mention_count | int64 | The mention preferences for this user in this channel as defined by the UrgendMentionCount object. |
| msg_count | int64 | The mention preferences for this user in this channel as defined by the MsgCount object. |
| msg_count_root | int64 | The mention preferences for this user in this channel as defined by the MsgCountRoot object. |
| last_viewed_at | int64 | The mention preferences for this user in this channel as defined by the LastViewedAt object. |
ChannelNotifyProps object#
이 객체는 ChannelMembership 객체의 구성원입니다.
| Field name | Type | Description |
|---|---|---|
| desktop | string | Preference for sending desktop notifications. Will be one of the following values: "default" - Global default. "all" - For all activity. "mention" - Only for mentions. "none" - Never. |
| mobile | string | Preference for sending mobile notifications. Will be one of the following values: "default" - Global default. "all" - For all activity. "mention" - Only for mentions. "none" - Never. |
| mark_unread | string | Preference for marking channel as unread. Will be one of the following values: "all" - For all unread messages. "mention" - Only for mentions. |
게시물 객체#
| Field name | Type | Description |
|---|---|---|
| team | string | The name of the team that this post is in. |
| channel | string | The name of the channel that this post is in. |
| user | string | The username of the user for this post. |
| message | string | The message that the post contains. |
| 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. |
| create_at | int | The timestamp for the post, in milliseconds since the Unix epoch. |
| reactions | array | The emoji reactions to this post. Will be an array of Reaction objects. |
반응 객체#
이 객체는 Post 객체의 구성원입니다.
| Field name | Type | Description |
|---|---|---|
| user | string | The username of the user for this reply. |
| emoji_name | string | The emoji of the reaction. |
| create_at | int | The timestamp for the reply, in milliseconds since the Unix epoch. |
이모지 객체#
| Field name | Type | Description |
|---|---|---|
| name | string | The emoji name. |
| image | string | The path (either absolute or relative to the current working directory) to the image file for this emoji. |
다이렉트 채널 객체#
| Field name | Type | Description |
|---|---|---|
| members | array | List of channel members. |
| favorited_by | array | List of channel members who have favorited the direct channel. |
| header | string | The channel header. |
다이렉트 게시물 객체#
| Field name | Type | Description |
|---|---|---|
| user | string | The username of the user for this post. |
| message | string | The message that the post contains. |
| create_at | int | The timestamp for the post, in milliseconds since the Unix epoch. |