gcloud alpha metastore services migrations start Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud alpha metastore services migrations start - start the migration on a Dataproc Metastore service
- SYNOPSIS
gcloud alpha metastore services migrations start(SERVICE:--location=LOCATION)((--cdc-password=CDC_PASSWORD--cdc-username=CDC_USERNAME--reverse-proxy-subnet=REVERSE_PROXY_SUBNET--subnet-ip-range=SUBNET_IP_RANGE--vpc-network=VPC_NETWORK:--bucket=BUCKET--root-path=ROOT_PATH; default="/migration") (--connection-password=CONNECTION_PASSWORD--connection-username=CONNECTION_USERNAME--hive-database-name=HIVE_DATABASE_NAME--instance-connection-name=INSTANCE_CONNECTION_NAME--ip-address=IP_ADDRESS--nat-subnet=NAT_SUBNET--port=PORT--proxy-subnet=PROXY_SUBNET))[--async][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(ALPHA)Start the migration on a Dataproc Metastore service.If run asynchronously with
--async, exits after printing theoperation name that can be used to poll the status of the migration operationvia:gcloudmetastoreoperationsdescribe
- POSITIONAL ARGUMENTS
- Service resource - The Dataproc Metastore service to start the migration on. Thearguments in this group can be used to specify the attributes of this resource.(NOTE) Some attributes are not given arguments in this group but can be set inother ways.
To set the
projectattribute:- provide the argument
serviceon the command line with a fullyspecified name; - provide the argument
--projecton the command line; - set the property
core/project.
This must be specified.
SERVICE- ID of the service or fully qualified identifier for the service.
To set the
serviceattribute:- provide the argument
serviceon the command line.
This positional argument must be specified if any of the other arguments in thisgroup are specified.
- provide the argument
--location=LOCATION- The location of the Dataproc Metastore service.
If not specified, will use
defaultmetastore/location.To set thelocationattribute:- provide the argument
serviceon the command line with a fullyspecified name; - provide the argument
--locationon the command line; - set the property
metastore/location.
- provide the argument
- provide the argument
- Service resource - The Dataproc Metastore service to start the migration on. Thearguments in this group can be used to specify the attributes of this resource.(NOTE) Some attributes are not given arguments in this group but can be set inother ways.
- REQUIRED FLAGS
- Configuration information required by Dataproc Metastore to start the migration.This must be specified.
- Configuration information specific to migrating from "Self-Managed HiveMetastore on Google Cloud Platform with Cloud SQL as the backend database" to aDataproc Metastore service.
- Configuration information required to start the Change Data Capture (CDC)streams from customer's Cloud SQL database to backend database of DataprocMetastore.This must be specified.
--cdc-password=CDC_PASSWORD- The password for the user that Datastream service should use for the MySQLconnection.
This flag argument must be specified if any of the other arguments in this groupare specified.
--cdc-username=CDC_USERNAME- The username that the Datastream service should use for the MySQL connection.
This flag argument must be specified if any of the other arguments in this groupare specified.
--reverse-proxy-subnet=REVERSE_PROXY_SUBNET- The URL of the subnetwork resource to create the VM instance hosting the reverseproxy in. More context inhttps://cloud.google.com/datastream/docs/private-connectivity#reverse-csql-proxyThe subnetwork should reside in the network provided in the request thatDatastream will peer to and should be in the same region as Datastream, in thefollowing format."projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}""
This flag argument must be specified if any of the other arguments in this groupare specified.
--subnet-ip-range=SUBNET_IP_RANGE- A "/29" CIDR IP range for peering with datastream
This flag argument must be specified if any of the other arguments in this groupare specified.
--vpc-network=VPC_NETWORK- Fully qualified name of the Cloud SQL instance's VPC network or the shared VPCnetwork that Datastream will peer to, in the following format:"projects/{project_id}/locations/global/networks/{network_id}". More context inhttps://cloud.google.com/datastream/docs/network-connectivity-options#privateconnectivity
This flag argument must be specified if any of the other arguments in this groupare specified.
--bucket=BUCKET- The bucket to write the intermediate stream event data in. The bucket name mustbe without any prefix like "gs://". This field is optional. If not set, theArtifacts Cloud Storage bucket is used.
--root-path=ROOT_PATH; default="/migration"- The root path inside the Cloud Storage bucket. The stream event data will bewritten to this path. The default value is "/migration".
- Configuration information required for Dataproc Metastore to establish customerdatabase connection before the cutover phase of migration.This must be specified.
--connection-password=CONNECTION_PASSWORD- The password for the user that Dataproc Metastore service should use to connectto the database.
This flag argument must be specified if any of the other arguments in this groupare specified.
--connection-username=CONNECTION_USERNAME- The username that Dataproc Metastore service should use to connect to thedatabase.
This flag argument must be specified if any of the other arguments in this groupare specified.
--hive-database-name=HIVE_DATABASE_NAME- The name of the hive metastore database.
This flag argument must be specified if any of the other arguments in this groupare specified.
--instance-connection-name=INSTANCE_CONNECTION_NAME- The Cloud SQL database connection name, in the format,"project_id:region:instance_name"
This flag argument must be specified if any of the other arguments in this groupare specified.
--ip-address=IP_ADDRESS- The private IP address of the Cloud SQL instance.
This flag argument must be specified if any of the other arguments in this groupare specified.
--nat-subnet=NAT_SUBNET- The relative resource name of the subnetwork to be used for Private ServiceConnect. Note that this cannot be a regular subnet and is used only for NAT.More context inhttps://cloud.google.com/vpc/docs/about-vpc-hosted-services#psc-subnets.This subnet is used to publish the SOCKS5 proxy service. The subnet size must beat least
/29and it should reside in a network through which theCloud SQL instance is accessible. The resource name should be in the format,"projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}"This flag argument must be specified if any of the other arguments in this groupare specified.
--port=PORT- The network port of the database.
This flag argument must be specified if any of the other arguments in this groupare specified.
--proxy-subnet=PROXY_SUBNET- The relative resource name of the subnetwork to deploy the SOCKS5 proxy servicein. The subnetwork should reside in a network through which the Cloud SQLinstance is accessible. The resource name should be in the format,"projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}"
This flag argument must be specified if any of the other arguments in this groupare specified.
- Configuration information required by Dataproc Metastore to start the migration.This must be specified.
- 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 helpfor details. - API REFERENCE
- This command uses the
metastore/v1alphaAPI. The full documentationfor this API can be found at:https://cloud.google.com/dataproc-metastore/docs - NOTES
- This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. This variant is also available:
gcloudbetametastoreservicesmigrationsstart
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 2026-01-21 UTC.