Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



Instances: export

Requires authorization

Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a MySQL dump file. Try it now .

Request

HTTP request

POST https://www.googleapis.com/sql/v1beta1/projects/project/instances/instance/export

Parameters

Parameter name Value Description
Required parameters
instance string Cloud SQL instance ID. This does not include the project ID.
project string Project ID of the project that contains the instance to be exported.

Authorization

This request requires authorization with the following scope ( read more about authentication and authorization ).

Scope
https://www.googleapis.com/auth/cloud-platform

Request body

In the request body, supply data with the following structure:

{
  "exportContext": {
    "kind": "sql#exportContext",
    "uri": string,
    "database": [
      string
    ],
    "table": [
      string
    ]
  }
}
Property name Value Description Notes
exportContext nested object Contains details about the export operation.
exportContext. kind string This is always sql#exportContext .
exportContext. uri string The path to the file in Google Cloud Storage where the export will be stored, or where it was already stored. The URI is in the form gs://bucketName/fileName . If the file already exists, the operation fails. If the filename ends with .gz, the contents are compressed.
exportContext. database[] list Databases (for example, guestbook ) from which the export is made. If unspecified, all databases are exported.
exportContext. table[] list Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "sql#instancesExport",
  "operation": string
}
Property name Value Description Notes
kind string This is always sql#instancesExport .
operation string An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.

Try it!

Use the APIs Explorer below to call this method on live data and see the response. Alternatively, try the standalone Explorer .

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.