Documentation Index

Fetch the complete documentation index at: https://cli.ncloud-docs.com/llms.txt

Use this file to discover all available pages before exploring further.

exportDbServerLogToObjectStorage

Prev Next

Available in VPC

Send Cloud DB for MongoDB instance DB server log files to Object Storage. To send DB server log files to Object Storage, Object Storage buckets for storing and searching DB server log files must be created in advance. For more information, see Object Storage user guide.

Syntax

The exportDbServerLogToObjectStorage syntax is as follows:

./ncloud vmongodb exportDbServerLogToObjectStorage \
    --cloudMongoDbServerInstanceNo <server-instance-no> \
    --logType <log|audit> \
    --fileName <log-file-name> \
    --bucketName <bucket-name> \
    [--regionCode <KR|SGN|JPN>] \
    [--output <json|xml>]

Options

This section describes the options available when running exportDbServerLogToObjectStorage.

Required options

The following options are required for exportDbServerLogToObjectStorage.

Options Type Required Description
--cloudMongoDbServerInstanceNo String Required Cloud DB for MongoDB server instance number
--logType String Required DB server log file type
  • log | audit
--fileName String Required DB server log file name
--bucketName String Required Name of the Object Storage bucket the DB server log file will be sent to

Common options

For information about the options common to all vmongodb subcommands, see Cloud DB for MongoDB (VPC) options.

Examples

If the DB server log file transfer request is successful, the log file will be transferred to the specified Object Storage bucket.

Command

The command example is as follows:

./ncloud vmongodb exportDbServerLogToObjectStorage \
    --cloudMongoDbServerInstanceNo 34567891 \
    --logType log \
    --fileName "mongod.log.2026-06-10T20-00-01" \
    --bucketName my-test-bucket \
    --regionCode KR \
    --output json

Output

The output example is as follows:

{
  "exportDbServerLogToObjectStorageResponse": {
    "requestId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
    "returnCode": "0",
    "returnMessage": "success"
  }
}