Docs Menu
Docs Home
/ /
Atlas CLI
/ / /

Atlas cluster OnlineArchives 생성

이 페이지의 내용

  • 구문
  • 옵션
  • 상속된 옵션
  • 예제

지정된 cluster의 collection에 대한 Atlas Online Archive를 만듭니다.

M10 이상 클러스터에 대한 온라인 아카이브를 만들 수 있습니다.

온라인 아카이브에 대해 자세히 알아보려면 https://www.mongodb.com/ko-kr/docs/atlas/online-archive/manage-online-archive/를 참조하세요.

이 명령을 사용하려면 프로젝트 데이터 액세스 관리자 역할이 있는 사용자 계정 또는 API 키로 인증해야 합니다.

명령 구문
atlas clusters onlineArchives create [options]
이름
유형
필수 사항
설명
--archiveAfter
int
거짓

이후 cluster 데이터를 보관할 일수입니다.

--file과 상호 배타적입니다.

--clusterName
문자열
true
--collection
문자열
거짓

컬렉션의 이름입니다.

--file과 상호 배타적입니다.

--dateField
문자열
거짓

문서에서 이미 인덱스된 날짜 필드의 이름입니다.

--file과 상호 배타적입니다.

--dateFormat
문자열
거짓

날짜 필드의 날짜 형식입니다. 유효한 값은 'ISODATE', 'EPOCH_SECONDS', 'EPOCH_MILLIS' 또는 'EPOCH_NANOSECONDS'입니다.

--file과 상호 배타적입니다. 이 값의 기본값은 "ISODATE"입니다.

--db
문자열
거짓

데이터베이스의 이름입니다.

--file과 상호 배타적입니다.

--expireAfterDays
int
거짓

삭제할 문서를 지정하는 날짜 기준에 사용되는 일수입니다.

--file과 상호 배타적입니다.

--file
문자열
거짓

Atlas Online Archive 설정을 정의하는 선택적 JSON 구성 파일의 경로입니다. 용 Atlas Online Archive 구성 파일에 대해 자세히 Atlas CLI 알아보려면 https://dochub.mongodb.org/core/atlas-cli-json-online-archive-config를 참조하세요.

--db, --collection, --dateField, --dateFormat, --archiveAfter, --expireAfterDays, --partition과 상호 배타적입니다.

-h, --help
거짓
만들기 도움말
-o, --output
문자열
거짓
출력 형식입니다. 유효한 값은 json, json-path, go-템플릿 또는 go-템플릿 파일입니다. 전체 출력을 보려면 -o json 옵션을 사용합니다.
--partition
strings
거짓

데이터를 분할하는 데 사용할 필드입니다. 자주 쿼리하는 필드를 쉼표로 구분하여 최대 2개까지 지정할 수 있습니다.

--file과 상호 배타적입니다.

--projectId
문자열
거짓
사용할 프로젝트를 식별하는 16진수 문자열입니다. 이 옵션은 구성 파일 또는 환경 변수의 설정을 재정의합니다.
이름
유형
필수 사항
설명
-P, --profile
문자열
거짓
구성 파일에서 사용할 프로필의 이름입니다. Atlas CLI의 프로필에 대해 자세히 알아보려면 https://dochub.mongodb.org/core/atlas-cli-save-connection-settings를 참조하세요.
# Create an online archive for the sample_mflix.movies collection in a cluster named myTestCluster when the current date is greater than the value of released date plus 2 days:
atlas clusters onlineArchive create --clusterName myTestCluster --db sample_mflix --collection movies --dateField released --archiveAfter 2 --output json
# Create an online archive for the sample_mflix.movies collection in a cluster named myTestCluster using a profile named egAtlasProfile when the current date is greater than the value of the released date plus 2 days. Data is partitioned based on the title field, year field, and released field from the documents in the collection:
atlas clusters onlineArchive create --clusterName myTestCluster --db sample_mflix --collection movies --dateField released --archiveAfter 2 --partition title,year --output json -P egAtlasProfile

돌아가기

OnlineArchives

이 페이지의 내용