gcloud metastore services export gcs (SERVICE : --location=LOCATION) --destination-folder=DESTINATION_FOLDER [--async] [--dump-type=DUMP_TYPE; default="mysql"] [GCLOUD_WIDE_FLAG …]
If run asynchronously with --async, exits after printing the
operation name that can be used to poll the status of the export via:
gcloud metastore operations describe
my-metastore-service in location us-central1 to the
destination folder gs://my-bucket/destination-folder, run:
gcloud metastore services export gcs my-metastore-service --location=us-central1 --destination-folder=gs://my-bucket/destination-folder
To set the project attribute:
service on the command line with a fully
specified name;
--project on the command line;
core/project.
SERVICE
To set the service attribute:
service on the command line.
--location=LOCATIONdefault metastore/location.
To set the location attribute:
service on the command line with a fully
specified name;
--location on the command line;
metastore/location.
--destination-folder=DESTINATION_FOLDERgs://<bucket_name>/<path_inside_bukcet>. A sub-folder
containing exported files will be created below it.
--async--dump-type=DUMP_TYPE; default="mysql"mysql.
DUMP_TYPE must be one of:
avromysql--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.
metastore/v1 API. The full documentation for
this API can be found at: https://cloud.google.com/dataproc-metastore/docs
gcloud alpha metastore services export gcsgcloud beta metastore services export gcs
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 2026-05-27 UTC.