File: //snap/google-cloud-cli/396/help/man/man1/gcloud_alpha_alloydb_clusters_export.1
.TH "GCLOUD_ALPHA_ALLOYDB_CLUSTERS_EXPORT" 1
.SH "NAME"
.HP
gcloud alpha alloydb clusters export \- export data from an AlloyDB cluster to Google Cloud Storage
.SH "SYNOPSIS"
.HP
\f5gcloud alpha alloydb clusters export\fR \fICLUSTER\fR \fB\-\-database\fR=\fIDATABASE\fR \fB\-\-gcs\-uri\fR=\fIGCS_URI\fR \fB\-\-region\fR=\fIREGION\fR ([\fB\-\-csv\fR\ \fB\-\-select\-query\fR=\fISELECT_QUERY\fR\ :\ \fB\-\-escape\-character\fR=\fIESCAPE_CHARACTER\fR\ \fB\-\-field\-delimiter\fR=\fIFIELD_DELIMITER\fR\ \fB\-\-quote\-character\fR=\fIQUOTE_CHARACTER\fR]\ |\ [\fB\-\-sql\fR\ :\ \fB\-\-schema\-only\fR\ \fB\-\-tables\fR=\fITABLES\fR\ [\fB\-\-clean\-target\-objects\fR\ :\ \fB\-\-if\-exist\-target\-objects\fR]]) [\fB\-\-async\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
\fB(ALPHA)\fR Export data from an AlloyDB cluster to Google Cloud Storage.
.SH "EXAMPLES"
To export a cluster, run:
.RS 2m
$ gcloud alpha alloydb clusters export my\-cluster \e
\-\-region=us\-central1 \-\-database=my\-database \e
\-\-gcs\-uri=gs://my\-bucket/my\-export\-file\-path \-\-csv \e
\-\-select\-query="SELECT * FROM my\-table"
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
\fICLUSTER\fR
AlloyDB cluster ID
.RE
.sp
.SH "REQUIRED FLAGS"
.RS 2m
.TP 2m
\fB\-\-database\fR=\fIDATABASE\fR
Database name.
.TP 2m
Destination URI where the file needs to be exported.
This must be specified.
.RS 2m
.TP 2m
\fB\-\-gcs\-uri\fR=\fIGCS_URI\fR
Path to the Google Cloud Storage file to which export has to be done.
.RE
.sp
.TP 2m
\fB\-\-region\fR=\fIREGION\fR
Regional location (e.g. \f5asia\-east1\fR, \f5us\-east1\fR). See the full list
of regions at https://cloud.google.com/sql/docs/instance\-locations.
.TP 2m
Export options for the cluster.
Exactly one of these must be specified:
.RS 2m
.TP 2m
CSV export options for the cluster.
.RS 2m
.TP 2m
\fB\-\-csv\fR
Specifies destination file type.
This flag argument must be specified if any of the other arguments in this group
are specified.
.TP 2m
\fB\-\-select\-query\fR=\fISELECT_QUERY\fR
Select query to be used for export.
This flag argument must be specified if any of the other arguments in this group
are specified.
.TP 2m
\fB\-\-escape\-character\fR=\fIESCAPE_CHARACTER\fR
Escape character to be used for export.
.TP 2m
\fB\-\-field\-delimiter\fR=\fIFIELD_DELIMITER\fR
Field delimiter to be used for export.
.TP 2m
\fB\-\-quote\-character\fR=\fIQUOTE_CHARACTER\fR
Quote character to be used for export.
.RE
.sp
.TP 2m
SQL export options for the cluster.
.RS 2m
.TP 2m
\fB\-\-sql\fR
Specifies destination file type.
This flag argument must be specified if any of the other arguments in this group
are specified.
.TP 2m
\fB\-\-schema\-only\fR
Export only schema of the database.
.TP 2m
\fB\-\-tables\fR=\fITABLES\fR
Comma\-separated list of table names which need to be exported.
.TP 2m
SQL export options to clean target objects.
.RS 2m
.TP 2m
\fB\-\-clean\-target\-objects\fR
If true, output commands to DROP all the dumped database objects prior to
outputting the commands for creating them.
This flag argument must be specified if any of the other arguments in this group
are specified.
.TP 2m
\fB\-\-if\-exist\-target\-objects\fR
If true, use DROP ... IF EXISTS commands to check for the object's existence
before dropping it in clean_target_objects mode.
.RE
.RE
.RE
.RE
.sp
.SH "OPTIONAL FLAGS"
.RS 2m
.TP 2m
\fB\-\-async\fR
Return immediately, without waiting for the operation in progress to complete.
.RE
.sp
.SH "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 \fB$ gcloud help\fR for details.
.SH "NOTES"
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct project,
you might be trying to access an API with an invitation\-only early access
allowlist. These variants are also available:
.RS 2m
$ gcloud alloydb clusters export
.RE
.RS 2m
$ gcloud beta alloydb clusters export
.RE