CLI Flags

August 13, 2026 ยท View on GitHub

This file is generated from the CLI flag definitions. Update the definitions and re-run the verification tests when flags change.

mongo-archive

FlagEnvironment VariableTypeDescription
--verboseMONGOARCHIVE__VERBOSEstringmore detailed log output (include multiple times for more verbosity, e.g. -vvvvv, or specify a numeric value, e.g. --verbose=N)
--quietMONGOARCHIVE__QUIETboolhide all log output
--hostMONGOARCHIVE__HOSTstringMongoDB host to connect to (setname/host1,host2 for replica sets)
--portMONGOARCHIVE__PORTstringMongoDB port (can also use --host hostname:port)
--sslMONGOARCHIVE__SSLboolconnect to a mongod or mongos that has ssl enabled
--ssl-ca-fileMONGOARCHIVE__SSL_CA_FILEstringthe .pem file containing the root certificate chain from the certificate authority
--ssl-pem-key-fileMONGOARCHIVE__SSL_PEM_KEY_FILEstringthe .pem file containing the certificate and key
--ssl-pem-key-passwordMONGOARCHIVE__SSL_PEM_KEY_PASSWORDstringthe password to decrypt the sslPEMKeyFile, if necessary
--ssl-crl-fileMONGOARCHIVE__SSL_CRL_FILEstringthe .pem file containing the certificate revocation list
--ssl-allow-invalid-certificatesMONGOARCHIVE__SSL_ALLOW_INVALID_CERTIFICATESboolbypass the validation for server certificates
--ssl-allow-invalid-hostnamesMONGOARCHIVE__SSL_ALLOW_INVALID_HOSTNAMESboolbypass the validation for server name
--ssl-fips-modeMONGOARCHIVE__SSL_FIPS_MODEbooluse FIPS mode of the installed openssl library
--usernameMONGOARCHIVE__USERNAMEstringusername for authentication
--passwordMONGOARCHIVE__PASSWORDstringpassword for authentication
--authentication-databaseMONGOARCHIVE__AUTHENTICATION_DATABASEstringdatabase that holds the user's credentials
--authentication-mechanismMONGOARCHIVE__AUTHENTICATION_MECHANISMstringauthentication mechanism to use
--gssapi-service-nameMONGOARCHIVE__GSSAPI_SERVICE_NAMEstringservice name to use when authenticating using GSSAPI/Kerberos (default: mongodb)
--gssapi-host-nameMONGOARCHIVE__GSSAPI_HOST_NAMEstringhostname to use when authenticating using GSSAPI/Kerberos (default: <remote server's address>)
--dbMONGOARCHIVE__DBstringdatabase to use
--collectionMONGOARCHIVE__COLLECTIONstringcollection to use
--uriMONGOARCHIVE__URIstringMongoDB uri connection string
--uri-pruneMONGOARCHIVE__URI_PRUNEboolprune MongoDB uri connection string
--queryMONGOARCHIVE__QUERYstringquery filter, as a v2 Extended JSON string
--query-fileMONGOARCHIVE__QUERY_FILEstringpath to a file containing a query filter (v2 Extended JSON)
--read-preferenceMONGOARCHIVE__READ_PREFERENCEstringspecify either a preference mode (e.g. 'nearest') or a preference json object
--force-table-scanMONGOARCHIVE__FORCE_TABLE_SCANboolforce a table scan
--az-endpointMONGOARCHIVE__AZ_ENDPOINTstringspecify the emulator hostname and Azure Blob Storage port
--az-account-nameMONGOARCHIVE__AZ_ACCOUNT_NAMEstringAzure Blob Storage Account Name
--az-account-keyMONGOARCHIVE__AZ_ACCOUNT_KEYstringAzure Blob Storage Account Key
--az-container-nameMONGOARCHIVE__AZ_CONTAINER_NAMEstringAzure Blob Storage Container Name
--aws-endpointMONGOARCHIVE__AWS_ENDPOINTstringAWS endpoint URL (hostname only or fully qualified URI)
--aws-access-key-idMONGOARCHIVE__AWS_ACCESS_KEY_IDstringAWS access key associated with an IAM account
--aws-secret-access-keyMONGOARCHIVE__AWS_SECRET_ACCESS_KEYstringAWS secret key associated with the access key
--aws-regionMONGOARCHIVE__AWS_REGIONstringAWS Region whose servers you want to send your requests to
--aws-bucketMONGOARCHIVE__AWS_BUCKETstringAWS S3 bucket name
--aws-s3-force-path-styleMONGOARCHIVE__AWS_S3_FORCE_PATH_STYLEboolforce the request to use path-style addressing, i.e., http://s3.amazonaws.com/BUCKET/KEY. By default, the S3 client will use virtual hosted bucket addressing when possible (http://BUCKET.s3.amazonaws.com/KEY)
--gcp-endpointMONGOARCHIVE__GCP_ENDPOINTstringGCP endpoint URL
--gcp-bucketMONGOARCHIVE__GCP_BUCKETstringGCP storage bucket name
--gcp-creds-fileMONGOARCHIVE__GCP_CREDS_FILEstringGCP service account's credentials file
--gcp-project-idMONGOARCHIVE__GCP_PROJECT_IDstringGCP service account's project id
--gcp-private-key-idMONGOARCHIVE__GCP_PRIVATE_KEY_IDstringGCP service account's private key id
--gcp-private-keyMONGOARCHIVE__GCP_PRIVATE_KEYstringGCP service account's private key
--gcp-client-emailMONGOARCHIVE__GCP_CLIENT_EMAILstringGCP service account's client email
--gcp-client-idMONGOARCHIVE__GCP_CLIENT_IDstringGCP service account's client id
--local-pathMONGOARCHIVE__LOCAL_PATHstringLocal directory path to store backups
--backup-prefixMONGOARCHIVE__BACKUP_PREFIXstringPrefix/namespace used for managed backup objects
--storage-backendMONGOARCHIVE__STORAGE_BACKENDstringStorage backend to use for restore when multiple backends are configured (azure, aws, gcp, local)
--expiry-daysMONGOARCHIVE__EXPIRY_DAYSstringThe maximum age, in days, for archives to be retained
--rocketchat-webhook-urlMONGOARCHIVE__ROCKETCHAT_WEBHOOK_URLstringRocket Chat Webhook URL
--rocketchat-webhook-prefixMONGOARCHIVE__ROCKETCHAT_WEBHOOK_PREFIXstringRocket Chat Webhook Prefix
--rocketchat-notify-on-failure-onlyMONGOARCHIVE__ROCKETCHAT_NOTIFY_ON_FAILURE_ONLYboolSend Rocket Chat notifications only when something goes wrong during the execution
--slack-webhook-urlMONGOARCHIVE__SLACK_WEBHOOK_URLstringSlack webhook URL
--slack-webhook-prefixMONGOARCHIVE__SLACK_WEBHOOK_PREFIXstringSlack message prefix
--slack-notify-on-failure-onlyMONGOARCHIVE__SLACK_NOTIFY_ON_FAILURE_ONLYboolSend Slack notifications only when something goes wrong during the execution
--smtp-hostMONGOARCHIVE__SMTP_HOSTstringSMTP server host
--smtp-portMONGOARCHIVE__SMTP_PORTstringSMTP server port
--smtp-usernameMONGOARCHIVE__SMTP_USERNAMEstringSMTP username
--smtp-passwordMONGOARCHIVE__SMTP_PASSWORDstringSMTP password
--smtp-fromMONGOARCHIVE__SMTP_FROMstringSMTP from address
--smtp-toMONGOARCHIVE__SMTP_TOstringComma-separated SMTP recipient addresses
--smtp-subject-prefixMONGOARCHIVE__SMTP_SUBJECT_PREFIXstringSMTP email subject prefix
--smtp-notify-on-failure-onlyMONGOARCHIVE__SMTP_NOTIFY_ON_FAILURE_ONLYboolSend SMTP notifications only when something goes wrong during the execution
--smtp-allow-insecure-no-tls-in-developmentMONGOARCHIVE__SMTP_ALLOW_INSECURE_NO_TLS_IN_DEVELOPMENTboolAllow SMTP without STARTTLS only for local development or emulator use
--ses-endpointMONGOARCHIVE__SES_ENDPOINTstringAWS SES endpoint override
--ses-regionMONGOARCHIVE__SES_REGIONstringAWS SES region
--ses-access-key-idMONGOARCHIVE__SES_ACCESS_KEY_IDstringAWS SES access key ID
--ses-secret-access-keyMONGOARCHIVE__SES_SECRET_ACCESS_KEYstringAWS SES secret access key
--ses-fromMONGOARCHIVE__SES_FROMstringAWS SES sender address
--ses-toMONGOARCHIVE__SES_TOstringComma-separated AWS SES recipient addresses
--ses-subject-prefixMONGOARCHIVE__SES_SUBJECT_PREFIXstringAWS SES email subject prefix
--ses-notify-on-failure-onlyMONGOARCHIVE__SES_NOTIFY_ON_FAILURE_ONLYboolSend AWS SES notifications only when something goes wrong during the execution
--notification-allow-insecure-http-in-developmentMONGOARCHIVE__NOTIFICATION_ALLOW_INSECURE_HTTP_IN_DEVELOPMENTboolAllow HTTP notification webhooks or endpoint overrides only for local development or emulator use
--cronMONGOARCHIVE__CRONboolrun a cron schedular and block current execution path
--cron-expressionMONGOARCHIVE__CRON_EXPRESSIONstringa string describes individual details of the cron schedule
--tzMONGOARCHIVE__TZstringuser-specified time zone
--keepMONGOARCHIVE__KEEPboolkeep data dump
--version(no env var)boolShow the version

Environment-Only Variables

Environment VariableDefaultDescription
MONGOARCHIVE__DUMP_PATH(none)Base directory for per-run dump workspaces before uploads
MONGOARCHIVE__STORAGE_OPERATION_TIMEOUT(none)Optional timeout applied to storage lookup, upload, and retention operations
MONGOARCHIVE__NOTIFICATION_TIMEOUT(none)Optional timeout applied to outbound notification sends

mongo-unarchive

FlagEnvironment VariableTypeDescription
--verboseMONGOUNARCHIVE__VERBOSEstringmore detailed log output (include multiple times for more verbosity, e.g. -vvvvv, or specify a numeric value, e.g. --verbose=N)
--quietMONGOUNARCHIVE__QUIETboolhide all log output
--hostMONGOUNARCHIVE__HOSTstringMongoDB host to connect to (setname/host1,host2 for replica sets)
--portMONGOUNARCHIVE__PORTstringMongoDB port (can also use --host hostname:port)
--sslMONGOUNARCHIVE__SSLboolconnect to a mongod or mongos that has ssl enabled
--ssl-ca-fileMONGOUNARCHIVE__SSL_CA_FILEstringthe .pem file containing the root certificate chain from the certificate authority
--ssl-pem-key-fileMONGOUNARCHIVE__SSL_PEM_KEY_FILEstringthe .pem file containing the certificate and key
--ssl-pem-key-passwordMONGOUNARCHIVE__SSL_PEM_KEY_PASSWORDstringthe password to decrypt the sslPEMKeyFile, if necessary
--ssl-crl-fileMONGOUNARCHIVE__SSL_CRL_FILEstringthe .pem file containing the certificate revocation list
--ssl-allow-invalid-certificatesMONGOUNARCHIVE__SSL_ALLOW_INVALID_CERTIFICATESboolbypass the validation for server certificates
--ssl-allow-invalid-hostnamesMONGOUNARCHIVE__SSL_ALLOW_INVALID_HOSTNAMESboolbypass the validation for server name
--ssl-fips-modeMONGOUNARCHIVE__SSL_FIPS_MODEbooluse FIPS mode of the installed openssl library
--usernameMONGOUNARCHIVE__USERNAMEstringusername for authentication
--passwordMONGOUNARCHIVE__PASSWORDstringpassword for authentication
--authentication-databaseMONGOUNARCHIVE__AUTHENTICATION_DATABASEstringdatabase that holds the user's credentials
--authentication-mechanismMONGOUNARCHIVE__AUTHENTICATION_MECHANISMstringauthentication mechanism to use
--gssapi-service-nameMONGOUNARCHIVE__GSSAPI_SERVICE_NAMEstringservice name to use when authenticating using GSSAPI/Kerberos (default: mongodb)
--gssapi-host-nameMONGOUNARCHIVE__GSSAPI_HOST_NAMEstringhostname to use when authenticating using GSSAPI/Kerberos (default: <remote server's address>)
--dbMONGOUNARCHIVE__DBstringdatabase to use
--collectionMONGOUNARCHIVE__COLLECTIONstringcollection to use
--uriMONGOUNARCHIVE__URIstringMongoDB uri connection string
--uri-pruneMONGOUNARCHIVE__URI_PRUNEboolprune MongoDB uri connection string
--ns-excludeMONGOUNARCHIVE__NS_EXCLUDEstringexclude matching namespaces
--ns-includeMONGOUNARCHIVE__NS_INCLUDEstringinclude matching namespaces
--ns-fromMONGOUNARCHIVE__NS_FROMstringrename matching namespaces, must have matching nsTo
--ns-toMONGOUNARCHIVE__NS_TOstringrename matched namespaces, must have matching nsFrom
--dropMONGOUNARCHIVE__DROPbooldrop each collection before import
--dry-runMONGOUNARCHIVE__DRY_RUNboolview summary without importing anything; cannot be combined with updates
--write-concernMONGOUNARCHIVE__WRITE_CONCERNstringwrite concern options
--no-index-restoreMONGOUNARCHIVE__NO_INDEX_RESTOREbooldon't restore indexes
--no-options-restoreMONGOUNARCHIVE__NO_OPTIONS_RESTOREbooldon't restore collection options
--keep-index-versionMONGOUNARCHIVE__KEEP_INDEX_VERSIONbooldon't update index version
--maintain-insertion-orderMONGOUNARCHIVE__MAINTAIN_INSERTION_ORDERboolrestore the documents in the order of their appearance in the input source. By default the insertions will be performed in an arbitrary order. Setting this flag also enables the behavior of --stopOnError and restricts NumInsertionWorkersPerCollection to 1
--num-parallel-collectionsMONGOUNARCHIVE__NUM_PARALLEL_COLLECTIONSstringnumber of collections to restore in parallel (default: 4)
--num-insertion-workers-per-collectionMONGOUNARCHIVE__NUM_INSERTION_WORKERS_PER_COLLECTIONstringnumber of insert operations to run concurrently per collection (default: 1)
--stop-on-errorMONGOUNARCHIVE__STOP_ON_ERRORboolhalt after encountering any error during insertion. By default, mongorestore will attempt to continue through document validation and DuplicateKey errors, but with this option enabled, the tool will stop instead. A small number of documents may be inserted after encountering an error even with this option enabled; use --maintainInsertionOrder to halt immediately after an error
--bypass-document-validationMONGOUNARCHIVE__BYPASS_DOCUMENT_VALIDATIONboolbypass document validation
--preserve-uuidMONGOUNARCHIVE__PRESERVE_UUIDboolpreserve original collection UUIDs (off by default, requires drop)
--az-endpointMONGOUNARCHIVE__AZ_ENDPOINTstringspecify the emulator hostname and Azure Blob Storage port
--az-account-nameMONGOUNARCHIVE__AZ_ACCOUNT_NAMEstringAzure Blob Storage Account Name
--az-account-keyMONGOUNARCHIVE__AZ_ACCOUNT_KEYstringAzure Blob Storage Account Key
--az-container-nameMONGOUNARCHIVE__AZ_CONTAINER_NAMEstringAzure Blob Storage Container Name
--aws-endpointMONGOUNARCHIVE__AWS_ENDPOINTstringAWS endpoint URL (hostname only or fully qualified URI)
--aws-access-key-idMONGOUNARCHIVE__AWS_ACCESS_KEY_IDstringAWS access key associated with an IAM account
--aws-secret-access-keyMONGOUNARCHIVE__AWS_SECRET_ACCESS_KEYstringAWS secret key associated with the access key
--aws-regionMONGOUNARCHIVE__AWS_REGIONstringAWS Region whose servers you want to send your requests to
--aws-bucketMONGOUNARCHIVE__AWS_BUCKETstringAWS S3 bucket name
--aws-s3-force-path-styleMONGOUNARCHIVE__AWS_S3_FORCE_PATH_STYLEboolforce the request to use path-style addressing, i.e., http://s3.amazonaws.com/BUCKET/KEY. By default, the S3 client will use virtual hosted bucket addressing when possible (http://BUCKET.s3.amazonaws.com/KEY)
--gcp-endpointMONGOUNARCHIVE__GCP_ENDPOINTstringGCP endpoint URL
--gcp-bucketMONGOUNARCHIVE__GCP_BUCKETstringGCP storage bucket name
--gcp-creds-fileMONGOUNARCHIVE__GCP_CREDS_FILEstringGCP service account's credentials file
--gcp-project-idMONGOUNARCHIVE__GCP_PROJECT_IDstringGCP service account's project id
--gcp-private-key-idMONGOUNARCHIVE__GCP_PRIVATE_KEY_IDstringGCP service account's private key id
--gcp-private-keyMONGOUNARCHIVE__GCP_PRIVATE_KEYstringGCP service account's private key
--gcp-client-emailMONGOUNARCHIVE__GCP_CLIENT_EMAILstringGCP service account's client email
--gcp-client-idMONGOUNARCHIVE__GCP_CLIENT_IDstringGCP service account's client id
--local-pathMONGOUNARCHIVE__LOCAL_PATHstringLocal directory path to store backups
--backup-prefixMONGOUNARCHIVE__BACKUP_PREFIXstringPrefix/namespace used for managed backup objects
--storage-backendMONGOUNARCHIVE__STORAGE_BACKENDstringStorage backend to use for restore when multiple backends are configured (azure, aws, gcp, local)
--object-nameMONGOUNARCHIVE__OBJECT_NAMEstringObject name of the archived file in the storage (optional)
--dirMONGOUNARCHIVE__DIRstringdirectory name that contains the dumped files
--updatesMONGOUNARCHIVE__UPDATESstringarray of update specifications in JSON string
--updates-fileMONGOUNARCHIVE__UPDATES_FILEstringpath to a file containing an array of update specifications
--keepMONGOUNARCHIVE__KEEPboolkeep data dump
--version(no env var)boolShow the version

Environment-Only Variables

Environment VariableDefaultDescription
MONGOUNARCHIVE__RESTORE_PATH(none)Base directory for per-run restore workspaces before extraction
MONGOUNARCHIVE__UPDATE_MAX_BYTES1048576Maximum size in bytes allowed for inline or file-based update specifications
MONGOUNARCHIVE__STORAGE_OPERATION_TIMEOUT(none)Optional timeout applied to storage lookup and download operations
MONGOUNARCHIVE__UPDATE_TIMEOUT(none)Optional timeout applied to MongoDB update connections and update operations