- NAME
-
- gcloud beta alloydb clusters export - export data from an AlloyDB cluster to Google Cloud Storage
- SYNOPSIS
-
-
gcloud beta alloydb clusters export
CLUSTER
--database
=DATABASE
--gcs-uri
=GCS_URI
--region
=REGION
([--csv
--select-query
=SELECT_QUERY
:--escape-character
=ESCAPE_CHARACTER
--field-delimiter
=FIELD_DELIMITER
--quote-character
=QUOTE_CHARACTER
] | [--sql
:--schema-only
--tables
=TABLES
[--clean-target-objects
:--if-exist-target-objects
]]) [--async
] [GCLOUD_WIDE_FLAG …
]
-
- DESCRIPTION
-
(BETA)
Export data from an AlloyDB cluster to Google Cloud Storage. - EXAMPLES
-
To export a cluster, run:
gcloud beta alloydb clusters export my-cluster --region=us-central1 --database=my-database --gcs-uri=gs://my-bucket/my-export-file-path --select-query="SELECT * FROM my-table"
- POSITIONAL ARGUMENTS
-
CLUSTER
- AlloyDB cluster ID
- REQUIRED FLAGS
-
--database
=DATABASE
- Database name from which export has to be done.
-
Destination URI where the file needs to be exported.
This must be specified.
--gcs-uri
=GCS_URI
- Path to the Google Cloud Storage file to which export has to be done.
--region
=REGION
-
Regional location (e.g.
asia-east1
,us-east1
). See the full list of regions at https://cloud.google.com/sql/docs/instance-locations. -
Export options for the cluster.
Exactly one of these must be specified:
-
CSV export options for the cluster.
--csv
-
Specifies destination file type.
This flag argument must be specified if any of the other arguments in this group are specified.
--select-query
=SELECT_QUERY
-
Select query to be used for export.
This flag argument must be specified if any of the other arguments in this group are specified.
--escape-character
=ESCAPE_CHARACTER
- Escape character to be used for export.
--field-delimiter
=FIELD_DELIMITER
- Field delimiter to be used for export.
--quote-character
=QUOTE_CHARACTER
- Quote character to be used for export.
-
SQL export options for the cluster.
--sql
-
Specifies destination file type.
This flag argument must be specified if any of the other arguments in this group are specified.
--schema-only
- Export only schema of the database.
--tables
=TABLES
- Comma-separated list of table names which need to be exported.
-
SQL export options to clean target objects.
--clean-target-objects
-
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.
--if-exist-target-objects
- If true, use DROP … IF EXISTS commands to check for the object's existence before dropping it in clean_target_objects mode.
-
CSV export options for the cluster.
- OPTIONAL FLAGS
-
--async
- Return immediately, without waiting for the operation in progress to complete.
- 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
-
This command is currently in beta and might change without notice. This variant
is also available:
gcloud alpha alloydb clusters export
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-11-19 UTC.