--- title: "exportDbServerLogToObjectStorage" slug: "cli-vmysql-exportdbserverlogtoobjectstorage" tags: ["Cloud DB for MySQL", "Object Storage", "VPC"] updated: 2026-09-17T10:08:39Z published: 2026-09-17T10:08:39Z canonical: "cli.ncloud-docs.com/cli-vmysql-exportdbserverlogtoobjectstorage" --- > ## 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 Available in VPC Send Cloud DB for MySQL 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](https://guide.ncloud-docs.com/docs/en/storage-storage-6-1). ## Syntax The `exportDbServerLogToObjectStorage` syntax is as follows: ``` ./ncloud vmysql exportDbServerLogToObjectStorage \ --cloudMysqlServerInstanceNo \ --logType \ --fileName \ --bucketName \ [--folderPath ] \ [--regionCode ] \ [--output ] ``` ## Options This section describes the options available when running `exportDbServerLogToObjectStorage`. ### Required options The following options are required for `exportDbServerLogToObjectStorage`. | Options | Type | Required | Description | | --- | --- | --- | --- | | `--cloudMysqlServerInstanceNo` | String | Required | Cloud DB for MySQL server instance number - See [getCloudMysqlInstanceList](/docs/en/cli-vmysql-getcloudmysqlinstancelist). | | `--logType` | String | Required | DB server log file type - `BINARY` \| `ERROR` \| `SLOW` \| `GENERAL` \| `AUDIT` - `BINARY`: Log all data changes that occurred on the master server. - `ERROR`: Log errors encountered by DB server. - `SLOW`: Log queries that run for more than a set amount of time and related information. - `GENERAL`: Log all executed SQL queries and related information. - `AUDIT`: Log security-related events. | | `--fileName` | String | Required | DB server log file name - See [getDbServerLogList](/docs/en/cli-vmysql-getdbserverloglist). | | `--bucketName` | String | Required | Name of the Object Storage bucket the DB server log file will be sent to - See [Object Storage](/docs/en/guide-objectstorage). | ### Optional options These are the optional options for `exportDbServerLogToObjectStorage`. Options that are not specified will use their default values. | Options | Type | Required | Description | | --- | --- | --- | --- | | `--folderPath` | String | Optional | Folder path where DB server log files will be sent | ### Common options For information about the options common to all `vmysql` subcommands, see [Cloud DB for MySQL (VPC) options](/docs/en/cli-vmysql#%EC%98%B5%EC%85%98). ## 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 vmysql exportDbServerLogToObjectStorage \ --cloudMysqlServerInstanceNo 34567890 \ --logType ERROR \ --fileName mysqld.err \ --bucketName my-test-bucket \ --folderPath cloud-db-for-mysql/ \ --regionCode KR \ --output json ``` ### Output The output example is as follows: ``` { "exportDbServerLogToObjectStorageResponse": { "requestId": "b2c3d4e5-f6a7-8901-bcde-f23456789012", "returnCode": "0", "returnMessage": "success" } } ```