Docs Menu
Docs Home
/ /
Atlas CLI
/ /

Online Archive Configuration File

On this page

  • Online Archive Settings
  • Example Online Archive Create Configuration File
  • Example Online Archive Update Configuration File
  • Example Online Archive Create Command
  • Example Online Archive Update Command

You can use a configuration file to specify the required settings for creating and updating an online archive using the Atlas CLI. The Atlas CLI accepts .json online archive configuration files.

Use the following resources to:

  • Learn the required settings you can specify in the online archive

  • View and copy sample configuration files.

You can specify the following settings to create or update an online archive either in the configuration file or as flags in the command:

Field
Type
Description

groupId

string

Unique identifier for your project. Your groupId is the same as your projectId. For existing groups, your groupId and projectId remains the same. The resource and corresponding endpoints use the term groups.

archiveID

string

Unique 24-hexadecimal digit string that identifies the online archive to update.

clusterName

string

Human-readable label that identifies the cluster that contains the collection for which you want to create or update one online archive.

collName

string

The name of your collection.

criteria

object

Rules by which MongoDB MongoDB Cloud archives data.

dbName

string

Human-readable label of the database that contains the collection that contains the online archive.

For detailed descriptions and a full list of available settings, see the request body schema in the API specification:

{
"name":"myCluster",
"groupId": "32y6e74b3g91947azb20e3b8",
"collName": "myCollection",
"collectionType": "TIMESERIES",
"criteria": {
"type": "DATE"
},
"dataExpirationRule": {
"expireAfterDays": 7
},
"dataProcessRegion": {
"cloudProvider": "AWS",
"region": "US_EAST_1"
},
"dbName": "myDB",
"partitionFields": [
{
"fieldName": "exampleField",
"order": 0
}
],
"paused": true,
"schedule": {
"type": "DEFAULT"
}
}
{
"name":"myCluster",
"groupId": "32y6e74b3g91947azb20e3b8",
"archiveId":"32y6e74b3g32y6e74b3gyb45",
"criteria": {
"type": "DATE"
},
"dataExpirationRule": {
"expireAfterDays": 7
},
"paused": true,
"schedule": {
"type": "DEFAULT"
}
}

To create an online archive configuration, specify the --file option and the path to the file. The following example creates an online archive by using a configuration file named online-archive-create-config.json:

atlas clusters onlineArchive create --file online-archive-create-config.json --output json

To update an online archive configuration, specify the --file option and the path to the file. The following example updates an online archive by using a configuration file named online-archive-update-config.json:

atlas clusters onlineArchive update --file online-archive-update-config.json --output json

Back

Search Nodes