InfoGrab DocsInfoGrab Docs

명령줄 도구

요약

자체 관리 배포 환경에서는 Mattermost 서버가 설치된 디렉터리에서 mattermost 명령어를 사용해 시스템을 구성할 수 있습니다. Mattermost v6.0부터 이 CLI 명령어의 대부분은 mmctl 명령줄 도구로 대체되었습니다.

사용 가능 플랜: Entry, Professional, Enterprise, Enterprise Advanced

자체 관리 배포 환경에서는 Mattermost 서버가 설치된 디렉터리에서 mattermost 명령어를 사용해 시스템을 구성할 수 있습니다. Mattermost 명령줄 인터페이스(CLI) 개요에 대해서는 Santos의 이 문서를 참조하세요.

Important

Mattermost v6.0부터 이 CLI 명령어의 대부분은 mmctl 명령줄 도구로 대체되었습니다. 단, mattermost import 명령어, mattermost export 명령어 및 관련 하위 명령어는 Mattermost v6.0부터도 계속 완전히 지원됩니다.

이 mattermost 명령어에는 다음 기능이 포함되어 있습니다:

컴플라이언스 내보내기

  • 데이터 내보내기
  • 내보내기 작업 예약

데이터베이스

  • 데이터베이스 초기화, 마이그레이션 실행 및 사용자 정의 기본값 로드
  • 적용되지 않은 마이그레이션에 대한 데이터베이스 스키마 마이그레이션
  • 데이터베이스를 초기 상태로 재설정
  • 가장 최근에 적용된 버전 번호 반환
  • 데이터베이스 마이그레이션 롤백

서버 운영

  • Mattermost 작업 서버 시작
  • Mattermost 서버 실행
  • Mattermost 버전 정보 표시

CLI 사용하기#

CLI 명령어를 실행하려면 Mattermost 루트 디렉터리에 있어야 합니다. Mattermost 기본 설치의 경우 루트 디렉터리는 /opt/mattermost입니다. 표준 설치 프로세스를 따른 경우 mattermost 사용자로 명령어를 실행해야 합니다. 실행 파일 이름은 mattermost이며 /opt/mattermost/bin 디렉터리에 있습니다.

예를 들어, Mattermost 기본 설치에서 Mattermost 버전을 확인하려면 다음과 같이 합니다:

cd /opt/mattermost/
sudo -u mattermost bin/mattermost version
Note
  • Mattermost 바이너리는 반드시 mattermost 사용자로 실행해야 합니다. 예를 들어 root 사용자로 실행하면 바이너리가 CLI 명령 실행 시 플러그인을 초기화하고 다양한 파일에 접근하므로 권한 관련 문제가 발생할 수 있습니다. root로 서버를 실행하면 플러그인 및 파일의 소유권이 덮어써지거나 기타 권한 오류가 발생할 수 있습니다.

  • 데이터베이스에 구성이 저장된 Mattermost 설치에서 CLI 명령어를 실행할 경우 다음과 같이 데이터베이스 연결 문자열을 전달해야 할 수 있습니다:

    bin/mattermost --config="postgres://mmuser:mostest_password@localhost:5432/mattermost_test?sslmode=disable\u0026connect_timeout=10"
    

GitLab Omnibus에서는 CLI 명령어 실행 시 다음 디렉터리에 있어야 합니다: /opt/gitlab/embedded/service/mattermost. 또한 mattermost 사용자로 명령어를 실행하고 구성 파일 위치를 지정해야 합니다. 실행 파일은 /opt/gitlab/embedded/bin/mattermost입니다.

예를 들어, GitLab Omnibus에서 Mattermost 버전을 확인하려면 다음과 같이 합니다:

cd /opt/gitlab/embedded/service/mattermost
sudo /opt/gitlab/embedded/bin/chpst -e /opt/gitlab/etc/mattermost/env -P -U mattermost:mattermost -u mattermost:mattermost /opt/gitlab/embedded/bin/mattermost version
Note

이 문서 페이지의 예제 명령어는 Mattermost 기본 설치 기준입니다. GitLab Omnibus에서 동작하도록 명령어를 수정해야 합니다.

Docker 설치에서는 /mattermost/bin 디렉터리가 PATH에 추가되어 있어 docker exec 명령어로 CLI를 직접 사용할 수 있습니다. docker-compose.yml로 Mattermost를 설치한 경우 컨테이너 이름이 mattermostdocker_app_1일 수 있습니다.

예를 들어, Docker 설치에서 Mattermost 버전을 확인하려면 다음과 같이 합니다:

docker exec -it <your-mattermost-container-name> mattermost version

아래의 Docker 설치 탭 세부 정보 및 명령어 참조는 Mattermost docker preview 이미지에도 적용됩니다.

Note

- CLI는 단일 노드에서 실행되어 고가용성 환경이 클러스터의 모든 노드에서 작업을 수행하는 메커니즘을 우회합니다. 따라서 고가용성 환경에서 CLI 명령어를 실행할 때 구성 설정을 변경하는 작업은 서버 재시작이 필요합니다. - CLI 명령어의 매개변수는 순서가 중요합니다. - 특수 문자(!, |, (, ), \, ', 또는 ")를 사용하는 경우 전체 인수를 작은따옴표로 감싸거나 개별 문자를 이스케이프해야 합니다.

mattermost CLI 명령어#

Description
Mattermost 인스턴스와 사용자를 구성하고 관리하기 위한 명령어

Options

-c, --config {string}           Configuration file to use. (default "config.json")
--disableconfigwatch {boolean}  When true, the config.json file will not be reloaded automatically when another process changes it (default "false")

Child Commands

mattermost db#

Description
데이터베이스 관련 명령어

Child Commands

  • mattermost db downgrade - 데이터베이스 마이그레이션 롤백. 롤백할 업데이트 계획 또는 쉼표로 구분된 버전 번호가 필요합니다.
  • mattermost db init - 데이터베이스 초기화, 마이그레이션 실행 및 사용자 정의 기본값 로드
  • mattermost db migrate - 적용되지 않은 마이그레이션에 대한 데이터베이스 스키마 마이그레이션
  • mattermost db reset - 데이터베이스를 초기 상태로 재설정
  • mattermost db version - 가장 최근에 적용된 버전 번호 반환

Options

-h, --help   help for db
-c, --config string   Configuration file to use

mattermost db downgrade#

Description
데이터베이스 마이그레이션을 롤백합니다. 롤백할 업데이트 계획 또는 쉼표로 구분된 버전 번호가 필요합니다.

Format

mattermost db downgrade

Example

mattermost db downgrade 99,100,101

Options

--<plan-file> string      Runs the rollback migrations defined in the plan file.

mattermost db init#

Description
주어진 데이터 소스 이름(DSN)에 대한 데이터베이스를 초기화하고, 마이그레이션을 실행하며, 지정된 경우 사용자 정의 기본값을 로드합니다.

Format

mattermost db init

Examples
config 플래그를 사용해 DSN을 전달합니다:

mattermost db init --config postgres://localhost/mattermost

MM_CONFIG 환경 변수를 사용하려면 이 명령어를 실행합니다:

MM_CONFIG=postgres://localhost/mattermost mattermost db init

데이터베이스에 로드할 사용자 정의 기본값 파일을 설정하려면 이 명령어를 실행합니다:

MM_CUSTOM_DEFAULTS_PATH=custom.json MM_CONFIG=postgres://localhost/mattermost mattermost db init

mattermost db migrate#

Description
적용되지 않은 마이그레이션이 있는 경우 데이터베이스 스키마를 마이그레이션합니다.

Child Commands

Format

mattermost db migrate

Example

mattermost db migrate

Options

--auto-recover bool     If the migration plan receives an error during migrations, this command will try to rollback migrations already applied within the plan. Not recommended without reviewing migration plan by combining --save-plan and --dry-run options.
--save-plan bool        Saves the plan for the migration into the file store so that it can be used for reviewing the plan or for downgrading.
--dry-run bool          Does not apply the migrations, but it validates how the migration would run based on the given conditions.

mattermost db reset#

Description
데이터베이스를 초기 상태로 재설정합니다. 애플리케이션 서버를 시작하지 않습니다. 스토어 레이어만 시작하고 migrations 테이블을 제외한 테이블을 비웁니다.

Format

mattermost db reset

Example

bin/mattermost db reset

mattermost db version#

Description
가장 최근에 적용된 버전 번호를 반환합니다.

Format

mattermost db version

mattermost export#

사용 가능 플랜: Enterprise, Enterprise Advanced

Description
컴플라이언스 및 여러 Mattermost 인스턴스 병합을 위한 데이터 내보내기 명령어

Child Commands

mattermost export actiance#

Mattermost v10.5부터 이 명령어는 더 이상 사용되지 않습니다. 향후 버전에서 mmctl 명령줄 도구에 추가될 예정입니다. 그때까지는 mattermost export schedule을 사용하세요.

mattermost export csv#

Mattermost v10.5부터 이 명령어는 더 이상 사용되지 않습니다. 향후 버전에서 mmctl 명령줄 도구에 추가될 예정입니다.

mattermost export global-relay-zip#

Mattermost v10.5부터 이 명령어는 더 이상 사용되지 않습니다. 향후 버전에서 mmctl 명령줄 도구에 추가될 예정입니다.

mattermost export schedule#

Description
서드파티 아카이브 시스템으로 가져오기에 적합한 형식으로 내보내기 작업을 예약합니다.

Format

mattermost export schedule

Example

bin/mattermost export schedule --exportFrom=1513102632

Options

--exportFrom string     Unix timestamp (seconds since epoch, UTC) to export data from.
--timeoutSeconds string Set how long the export should run for before timing out.

mattermost export bulk#

Mattermost v6.0부터 이 명령어는 Mattermost에서 데이터를 내보내는 지원 방법으로 mmctl export 명령어를 대신 사용하도록 더 이상 사용되지 않습니다.


mattermost help#

Description
Mattermost 명령줄 도구에 대한 전체 문서를 Markdown 형식으로 생성합니다.

Format

mattermost help {outputdir}

mattermost import#

Description
Mattermost로 데이터를 가져옵니다.

Child Command

mattermost import bulk#

Mattermost v6.0부터 이 명령어는 Mattermost로 데이터를 가져오는 지원 방법으로 mmctl import 명령어를 대신 사용하도록 더 이상 사용되지 않습니다.


mattermost jobserver#

Description
Mattermost 작업 서버를 시작합니다.

Format

mattermost jobserver

Example

bin/mattermost jobserver

mattermost server#

Description
Mattermost 서버를 실행합니다.

Format

mattermost server

mattermost version#

Note

Mattermost v6.5부터 이 CLI 명령어는 더 이상 데이터베이스와 상호 작용하지 않습니다. 스키마 마이그레이션을 트리거하기 위해 mattermost db migrate CLI 명령어가 도입되었습니다.

Desription
Mattermost 버전 정보를 표시합니다.

Format

mattermost version

문제 해결#

명령어 실행이 중단되어 완료되지 않는 경우#

Bleve 검색 인덱싱이 활성화된 경우 System Console > Experimental > Bleve에서 일시적으로 비활성화하고 명령어를 다시 실행하세요. 또는 새 mmctl 명령줄 도구를 사용할 수도 있습니다.

Bleve는 여러 프로세스가 동일한 인덱스를 열고 조작하는 것을 지원하지 않습니다. 따라서 Mattermost 서버가 실행 중인 경우 CLI를 실행하려 하면 인덱스를 여는 동안 잠금이 발생합니다.

Bleve 검색 인덱싱을 사용하지 않는 경우 문제 해결 포럼에 게시하여 도움을 받으세요.

명령줄 도구

Mattermost v12.0
원문 보기

요약

자체 관리 배포 환경에서는 Mattermost 서버가 설치된 디렉터리에서 mattermost 명령어를 사용해 시스템을 구성할 수 있습니다. Mattermost v6.0부터 이 CLI 명령어의 대부분은 mmctl 명령줄 도구로 대체되었습니다.

사용 가능 플랜: Entry, Professional, Enterprise, Enterprise Advanced

자체 관리 배포 환경에서는 Mattermost 서버가 설치된 디렉터리에서 mattermost 명령어를 사용해 시스템을 구성할 수 있습니다. Mattermost 명령줄 인터페이스(CLI) 개요에 대해서는 Santos의 이 문서를 참조하세요.

Important

Mattermost v6.0부터 이 CLI 명령어의 대부분은 mmctl 명령줄 도구로 대체되었습니다. 단, mattermost import 명령어, mattermost export 명령어 및 관련 하위 명령어는 Mattermost v6.0부터도 계속 완전히 지원됩니다.

이 mattermost 명령어에는 다음 기능이 포함되어 있습니다:

컴플라이언스 내보내기

  • 데이터 내보내기
  • 내보내기 작업 예약

데이터베이스

  • 데이터베이스 초기화, 마이그레이션 실행 및 사용자 정의 기본값 로드
  • 적용되지 않은 마이그레이션에 대한 데이터베이스 스키마 마이그레이션
  • 데이터베이스를 초기 상태로 재설정
  • 가장 최근에 적용된 버전 번호 반환
  • 데이터베이스 마이그레이션 롤백

서버 운영

  • Mattermost 작업 서버 시작
  • Mattermost 서버 실행
  • Mattermost 버전 정보 표시

CLI 사용하기#

CLI 명령어를 실행하려면 Mattermost 루트 디렉터리에 있어야 합니다. Mattermost 기본 설치의 경우 루트 디렉터리는 /opt/mattermost입니다. 표준 설치 프로세스를 따른 경우 mattermost 사용자로 명령어를 실행해야 합니다. 실행 파일 이름은 mattermost이며 /opt/mattermost/bin 디렉터리에 있습니다.

예를 들어, Mattermost 기본 설치에서 Mattermost 버전을 확인하려면 다음과 같이 합니다:

cd /opt/mattermost/
sudo -u mattermost bin/mattermost version
Note
  • Mattermost 바이너리는 반드시 mattermost 사용자로 실행해야 합니다. 예를 들어 root 사용자로 실행하면 바이너리가 CLI 명령 실행 시 플러그인을 초기화하고 다양한 파일에 접근하므로 권한 관련 문제가 발생할 수 있습니다. root로 서버를 실행하면 플러그인 및 파일의 소유권이 덮어써지거나 기타 권한 오류가 발생할 수 있습니다.

  • 데이터베이스에 구성이 저장된 Mattermost 설치에서 CLI 명령어를 실행할 경우 다음과 같이 데이터베이스 연결 문자열을 전달해야 할 수 있습니다:

    bin/mattermost --config="postgres://mmuser:mostest_password@localhost:5432/mattermost_test?sslmode=disable\u0026connect_timeout=10"
    

GitLab Omnibus에서는 CLI 명령어 실행 시 다음 디렉터리에 있어야 합니다: /opt/gitlab/embedded/service/mattermost. 또한 mattermost 사용자로 명령어를 실행하고 구성 파일 위치를 지정해야 합니다. 실행 파일은 /opt/gitlab/embedded/bin/mattermost입니다.

예를 들어, GitLab Omnibus에서 Mattermost 버전을 확인하려면 다음과 같이 합니다:

cd /opt/gitlab/embedded/service/mattermost
sudo /opt/gitlab/embedded/bin/chpst -e /opt/gitlab/etc/mattermost/env -P -U mattermost:mattermost -u mattermost:mattermost /opt/gitlab/embedded/bin/mattermost version
Note

이 문서 페이지의 예제 명령어는 Mattermost 기본 설치 기준입니다. GitLab Omnibus에서 동작하도록 명령어를 수정해야 합니다.

Docker 설치에서는 /mattermost/bin 디렉터리가 PATH에 추가되어 있어 docker exec 명령어로 CLI를 직접 사용할 수 있습니다. docker-compose.yml로 Mattermost를 설치한 경우 컨테이너 이름이 mattermostdocker_app_1일 수 있습니다.

예를 들어, Docker 설치에서 Mattermost 버전을 확인하려면 다음과 같이 합니다:

docker exec -it <your-mattermost-container-name> mattermost version

아래의 Docker 설치 탭 세부 정보 및 명령어 참조는 Mattermost docker preview 이미지에도 적용됩니다.

Note

- CLI는 단일 노드에서 실행되어 고가용성 환경이 클러스터의 모든 노드에서 작업을 수행하는 메커니즘을 우회합니다. 따라서 고가용성 환경에서 CLI 명령어를 실행할 때 구성 설정을 변경하는 작업은 서버 재시작이 필요합니다. - CLI 명령어의 매개변수는 순서가 중요합니다. - 특수 문자(!, |, (, ), \, ', 또는 ")를 사용하는 경우 전체 인수를 작은따옴표로 감싸거나 개별 문자를 이스케이프해야 합니다.

mattermost CLI 명령어#

Description
Mattermost 인스턴스와 사용자를 구성하고 관리하기 위한 명령어

Options

-c, --config {string}           Configuration file to use. (default "config.json")
--disableconfigwatch {boolean}  When true, the config.json file will not be reloaded automatically when another process changes it (default "false")

Child Commands

mattermost db#

Description
데이터베이스 관련 명령어

Child Commands

  • mattermost db downgrade - 데이터베이스 마이그레이션 롤백. 롤백할 업데이트 계획 또는 쉼표로 구분된 버전 번호가 필요합니다.
  • mattermost db init - 데이터베이스 초기화, 마이그레이션 실행 및 사용자 정의 기본값 로드
  • mattermost db migrate - 적용되지 않은 마이그레이션에 대한 데이터베이스 스키마 마이그레이션
  • mattermost db reset - 데이터베이스를 초기 상태로 재설정
  • mattermost db version - 가장 최근에 적용된 버전 번호 반환

Options

-h, --help   help for db
-c, --config string   Configuration file to use

mattermost db downgrade#

Description
데이터베이스 마이그레이션을 롤백합니다. 롤백할 업데이트 계획 또는 쉼표로 구분된 버전 번호가 필요합니다.

Format

mattermost db downgrade

Example

mattermost db downgrade 99,100,101

Options

--<plan-file> string      Runs the rollback migrations defined in the plan file.

mattermost db init#

Description
주어진 데이터 소스 이름(DSN)에 대한 데이터베이스를 초기화하고, 마이그레이션을 실행하며, 지정된 경우 사용자 정의 기본값을 로드합니다.

Format

mattermost db init

Examples
config 플래그를 사용해 DSN을 전달합니다:

mattermost db init --config postgres://localhost/mattermost

MM_CONFIG 환경 변수를 사용하려면 이 명령어를 실행합니다:

MM_CONFIG=postgres://localhost/mattermost mattermost db init

데이터베이스에 로드할 사용자 정의 기본값 파일을 설정하려면 이 명령어를 실행합니다:

MM_CUSTOM_DEFAULTS_PATH=custom.json MM_CONFIG=postgres://localhost/mattermost mattermost db init

mattermost db migrate#

Description
적용되지 않은 마이그레이션이 있는 경우 데이터베이스 스키마를 마이그레이션합니다.

Child Commands

Format

mattermost db migrate

Example

mattermost db migrate

Options

--auto-recover bool     If the migration plan receives an error during migrations, this command will try to rollback migrations already applied within the plan. Not recommended without reviewing migration plan by combining --save-plan and --dry-run options.
--save-plan bool        Saves the plan for the migration into the file store so that it can be used for reviewing the plan or for downgrading.
--dry-run bool          Does not apply the migrations, but it validates how the migration would run based on the given conditions.

mattermost db reset#

Description
데이터베이스를 초기 상태로 재설정합니다. 애플리케이션 서버를 시작하지 않습니다. 스토어 레이어만 시작하고 migrations 테이블을 제외한 테이블을 비웁니다.

Format

mattermost db reset

Example

bin/mattermost db reset

mattermost db version#

Description
가장 최근에 적용된 버전 번호를 반환합니다.

Format

mattermost db version

mattermost export#

사용 가능 플랜: Enterprise, Enterprise Advanced

Description
컴플라이언스 및 여러 Mattermost 인스턴스 병합을 위한 데이터 내보내기 명령어

Child Commands

mattermost export actiance#

Mattermost v10.5부터 이 명령어는 더 이상 사용되지 않습니다. 향후 버전에서 mmctl 명령줄 도구에 추가될 예정입니다. 그때까지는 mattermost export schedule을 사용하세요.

mattermost export csv#

Mattermost v10.5부터 이 명령어는 더 이상 사용되지 않습니다. 향후 버전에서 mmctl 명령줄 도구에 추가될 예정입니다.

mattermost export global-relay-zip#

Mattermost v10.5부터 이 명령어는 더 이상 사용되지 않습니다. 향후 버전에서 mmctl 명령줄 도구에 추가될 예정입니다.

mattermost export schedule#

Description
서드파티 아카이브 시스템으로 가져오기에 적합한 형식으로 내보내기 작업을 예약합니다.

Format

mattermost export schedule

Example

bin/mattermost export schedule --exportFrom=1513102632

Options

--exportFrom string     Unix timestamp (seconds since epoch, UTC) to export data from.
--timeoutSeconds string Set how long the export should run for before timing out.

mattermost export bulk#

Mattermost v6.0부터 이 명령어는 Mattermost에서 데이터를 내보내는 지원 방법으로 mmctl export 명령어를 대신 사용하도록 더 이상 사용되지 않습니다.


mattermost help#

Description
Mattermost 명령줄 도구에 대한 전체 문서를 Markdown 형식으로 생성합니다.

Format

mattermost help {outputdir}

mattermost import#

Description
Mattermost로 데이터를 가져옵니다.

Child Command

mattermost import bulk#

Mattermost v6.0부터 이 명령어는 Mattermost로 데이터를 가져오는 지원 방법으로 mmctl import 명령어를 대신 사용하도록 더 이상 사용되지 않습니다.


mattermost jobserver#

Description
Mattermost 작업 서버를 시작합니다.

Format

mattermost jobserver

Example

bin/mattermost jobserver

mattermost server#

Description
Mattermost 서버를 실행합니다.

Format

mattermost server

mattermost version#

Note

Mattermost v6.5부터 이 CLI 명령어는 더 이상 데이터베이스와 상호 작용하지 않습니다. 스키마 마이그레이션을 트리거하기 위해 mattermost db migrate CLI 명령어가 도입되었습니다.

Desription
Mattermost 버전 정보를 표시합니다.

Format

mattermost version

문제 해결#

명령어 실행이 중단되어 완료되지 않는 경우#

Bleve 검색 인덱싱이 활성화된 경우 System Console > Experimental > Bleve에서 일시적으로 비활성화하고 명령어를 다시 실행하세요. 또는 새 mmctl 명령줄 도구를 사용할 수도 있습니다.

Bleve는 여러 프로세스가 동일한 인덱스를 열고 조작하는 것을 지원하지 않습니다. 따라서 Mattermost 서버가 실행 중인 경우 CLI를 실행하려 하면 인덱스를 여는 동안 잠금이 발생합니다.

Bleve 검색 인덱싱을 사용하지 않는 경우 문제 해결 포럼에 게시하여 도움을 받으세요.