gcloud sql instances export

NAME
gcloud sql instances export - exports data from a Cloud SQL instance
SYNOPSIS
gcloud sql instances exportINSTANCEURI[--async][--database=DATABASE,[DATABASE,…],-dDATABASE,[DATABASE,…]][--table=TABLE,[TABLE,…],-tTABLE,[TABLE,…]][GCLOUD_WIDE_FLAG]
DESCRIPTION
(DEPRECATED) Exports data from a Cloud SQL instance.

This command is deprecated and will be removed in version 205.0.0. Usegcloud sql export sqlinstead.

Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as aMySQL dump file.

POSITIONAL ARGUMENTS
INSTANCE
Cloud SQL instance ID.
URI
The path to the file in Google Cloud Storage where the export will be stored.The URI is in the form gs://bucketName/fileName. If the file already exists, theoperation fails. If the filename ends with .gz, the contents are compressed.
FLAGS
--async
Return immediately, without waiting for the operation in progress to complete.
--database=DATABASE,[DATABASE,…],-dDATABASE,[DATABASE,…]
Database(s) from which the export is made. Information on requirements can befound here:https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/instances/export#exportContext.databases
--table=TABLE,[TABLE,…],-tTABLE,[TABLE,…]
Tables to export from the specified database. If you specify tables, specify oneand only one database. For Postgres instances, only one table can be exported ata time.
GCLOUD WIDE FLAGS
These flags are available to all commands:--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.

Run$gcloud help for details.

NOTES
These variants are also available:
gcloudalphasqlinstancesexport
gcloudbetasqlinstancesexport

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-05-07 UTC.