HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/current/help/man/man1/gcloud_database-migration_migration-jobs_create.1
.TH "GCLOUD_DATABASE\-MIGRATION_MIGRATION\-JOBS_CREATE" 1



.SH "NAME"
.HP
gcloud database\-migration migration\-jobs create \- create a Database Migration Service migration job



.SH "SYNOPSIS"
.HP
\f5gcloud database\-migration migration\-jobs create\fR (\fIMIGRATION_JOB\fR\ :\ \fB\-\-region\fR=\fIREGION\fR) \fB\-\-destination\fR=\fIDESTINATION\fR \fB\-\-source\fR=\fISOURCE\fR \fB\-\-type\fR=\fITYPE\fR [\fB\-\-no\-async\fR] [\fB\-\-commit\-id\fR=\fICOMMIT_ID\fR] [\fB\-\-conversion\-workspace\fR=\fICONVERSION_WORKSPACE\fR] [\fB\-\-display\-name\fR=\fIDISPLAY_NAME\fR] [\fB\-\-dump\-parallel\-level\fR=\fIDUMP_PARALLEL_LEVEL\fR] [\fB\-\-dump\-type\fR=\fIDUMP_TYPE\fR] [\fB\-\-filter\fR=\fIFILTER\fR] [\fB\-\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]] [\fB\-\-all\-databases\fR\ |\ \fB\-\-databases\-filter\fR=\fIdatabaseName\fR,[...]] [\fB\-\-cmek\-key\fR=\fICMEK_KEY\fR\ :\ \fB\-\-cmek\-keyring\fR=\fICMEK_KEYRING\fR\ \fB\-\-cmek\-project\fR=\fICMEK_PROJECT\fR] [\fB\-\-dump\-flags\fR=[\fIKEY\fR=\fIVALUE\fR,...]\ |\ \fB\-\-dump\-path\fR=\fIDUMP_PATH\fR] [\fB\-\-max\-concurrent\-cdc\-connections\fR=\fIMAX_CONCURRENT_CDC_CONNECTIONS\fR\ \fB\-\-max\-concurrent\-full\-dump\-connections\fR=\fIMAX_CONCURRENT_FULL_DUMP_CONNECTIONS\fR\ \fB\-\-skip\-full\-dump\fR\ \fB\-\-oracle\-cdc\-start\-position\fR=\fIORACLE_CDC_START_POSITION\fR\ |\ \fB\-\-sqlserver\-cdc\-start\-position\fR=\fISQLSERVER_CDC_START_POSITION\fR\ \fB\-\-max\-concurrent\-destination\-connections\fR=\fIMAX_CONCURRENT_DESTINATION_CONNECTIONS\fR\ \fB\-\-transaction\-timeout\fR=\fITRANSACTION_TIMEOUT\fR] [\fB\-\-peer\-vpc\fR=\fIPEER_VPC\fR\ |\ \fB\-\-static\-ip\fR\ |\ [\fB\-\-vm\-ip\fR=\fIVM_IP\fR\ \fB\-\-vm\-port\fR=\fIVM_PORT\fR\ \fB\-\-vpc\fR=\fIVPC\fR\ :\ \fB\-\-vm\fR=\fIVM\fR]] [\fB\-\-sqlserver\-databases\fR=\fIdatabaseName\fR,[...]\ :\ \fB\-\-sqlserver\-diff\-backup\fR\ \fB\-\-sqlserver\-encrypted\-databases\fR=\fISQLSERVER_ENCRYPTED_DATABASES\fR\ \fB\-\-sqlserver\-promote\-when\-ready\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "DESCRIPTION"

Create a Database Migration Service migration job. Recommended steps before
creating the migration job:
.RS 2m
.IP "\(bu" 2m
Create a source connection profile. See prerequisites here
(https://cloud.google.com/database\-migration/docs/mysql/configure\-source\-database).
.IP "\(bu" 2m
Create a destination connection profile. For migrating to Cloud SQL for MySQL or
Cloud SQL for PostgreSQL, use the cloudsql connection profile for DMS to create
the CloudSQL replica for you.
.IP "\(bu" 2m
Configure the connectivity method. See prerequisites here
(https://cloud.google.com/database\-migration/docs/mysql/configure\-connectivity).
.IP "\(bu" 2m
[Heterogeneous migrations only] Create a conversion workspace.
.RE
.sp



.SH "EXAMPLES"

To create a continuous migration job with IP allowlist connectivity:

.RS 2m
$ gcloud database\-migration migration\-jobs create my\-migration\-job \e
  \-\-region=us\-central1 \-\-type=CONTINUOUS \-\-source=cp1 \e
  \-\-destination=cp2
.RE

To create a continuous migration job with VPC peering connectivity:

.RS 2m
$ gcloud database\-migration migration\-jobs create my\-migration\-job \e
  \-\-region=us\-central1 \-\-type=CONTINUOUS \-\-source=cp1 \e
  \-\-destination=cp2 \e
  \-\-peer\-vpc=projects/my\-project/global/networks/my\-network
.RE

To create a one\-time migration job with reverse\-SSH tunnel connectivity:

.RS 2m
$ gcloud database\-migration migration\-jobs create my\-migration\-job \e
  \-\-region=us\-central1 \-\-type=ONE_TIME \-\-source=cp1 \e
  \-\-destination=cp2 \-\-vm=vm1 \-\-vm\-ip=1.1.1.1 \-\-vm\-port=1111 \e
  \-\-vpc=projects/my\-project/global/networks/my\-network
.RE

To create a heterogeneous continuous migration job:

.RS 2m
$ gcloud database\-migration migration\-jobs create my\-migration\-job \e
  \-\-region=us\-central1 \-\-type=CONTINUOUS \-\-source=cp1 \e
  \-\-destination=cp2 \-\-conversion\-workspace=cw
.RE

To create a continuous SQL Server to SQL Server homogeneous migration job with
differential backup enabled:.RS 2m
$ gcloud database\-migration migration\-jobs create my\-migration\-job \e
  \-\-region=us\-central1 \-\-type=CONTINUOUS \-\-source=cp1 \e
  \-\-destination=cp2 \-\-sqlserver\-diff\-backup \e
  \-\-sqlserver\-databases=db1,db2,db3

.RE

To create a continuous SQL Server to SQL Server homogeneous migration job with
encrypted databases:.RS 2m
$ gcloud database\-migration migration\-jobs create my\-migration\-job \e
  \-\-region=us\-central1 \-\-type=CONTINUOUS \-\-source=cp1 \e
  \-\-destination=cp2 \-\-sqlserver\-databases=db1,db2,db3 \e
  \-\-sqlserver\-encrypted\-databases=PATH/TO/ENCRYPTION/SETTINGS

.RE



.SH "POSITIONAL ARGUMENTS"

.RS 2m
.TP 2m

Migration job resource \- The migration job to create. The arguments 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 in other ways.

To set the \f5project\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5migration_job\fR on the command line with a fully
specified name;
.IP "\(em" 2m
provide the argument \f5\-\-project\fR on the command line;
.IP "\(em" 2m
set the property \f5core/project\fR.
.RE
.sp

This must be specified.


.RS 2m
.TP 2m
\fIMIGRATION_JOB\fR

ID of the migration_job or fully qualified identifier for the migration_job.

To set the \f5migration_job\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5migration_job\fR on the command line.
.RE
.sp

This positional argument must be specified if any of the other arguments in this
group are specified.

.TP 2m
\fB\-\-region\fR=\fIREGION\fR

The Cloud region for the migration_job.

To set the \f5region\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5migration_job\fR on the command line with a fully
specified name;
.IP "\(bu" 2m
provide the argument \f5\-\-region\fR on the command line.
.RE
.sp


.RE
.RE
.sp

.SH "REQUIRED FLAGS"

.RS 2m
.TP 2m

Connection profile resource \- ID of the destination connection profile,
representing the destination database. This represents a Cloud resource. (NOTE)
Some attributes are not given arguments in this group but can be set in other
ways.

To set the \f5project\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5\-\-destination\fR on the command line with a fully
specified name;
.IP "\(em" 2m
provide the argument \f5\-\-project\fR on the command line;
.IP "\(em" 2m
set the property \f5core/project\fR.
.RE
.sp

To set the \f5region\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5\-\-destination\fR on the command line with a fully
specified name;
.IP "\(em" 2m
provide the argument \f5\-\-region\fR on the command line.
.RE
.sp

This must be specified.


.RS 2m
.TP 2m
\fB\-\-destination\fR=\fIDESTINATION\fR

ID of the connection_profile or fully qualified identifier for the
connection_profile.

To set the \f5connection_profile\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5\-\-destination\fR on the command line.
.RE
.sp

.RE
.sp
.TP 2m

Connection profile resource \- ID of the source connection profile, representing
the source database. This represents a Cloud resource. (NOTE) Some attributes
are not given arguments in this group but can be set in other ways.

To set the \f5project\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5\-\-source\fR on the command line with a fully specified
name;
.IP "\(em" 2m
provide the argument \f5\-\-project\fR on the command line;
.IP "\(em" 2m
set the property \f5core/project\fR.
.RE
.sp

To set the \f5region\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5\-\-source\fR on the command line with a fully specified
name;
.IP "\(em" 2m
provide the argument \f5\-\-region\fR on the command line.
.RE
.sp

This must be specified.


.RS 2m
.TP 2m
\fB\-\-source\fR=\fISOURCE\fR

ID of the connection_profile or fully qualified identifier for the
connection_profile.

To set the \f5connection_profile\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5\-\-source\fR on the command line.
.RE
.sp

.RE
.sp
.TP 2m
\fB\-\-type\fR=\fITYPE\fR

Type of the migration job. \fITYPE\fR must be one of: \fBONE_TIME\fR,
\fBCONTINUOUS\fR.


.RE
.sp

.SH "OPTIONAL FLAGS"

.RS 2m
.TP 2m
\fB\-\-no\-async\fR

Waits for the operation in progress to complete before returning.

.TP 2m
\fB\-\-commit\-id\fR=\fICOMMIT_ID\fR

Commit id for the conversion workspace to use for creating the migration job. If
not specified, the latest commit id will be used by default.

.TP 2m

Conversion workspace resource \- Name of the conversion workspaces to be used
for the migration job This represents a Cloud resource. (NOTE) Some attributes
are not given arguments in this group but can be set in other ways.

To set the \f5project\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5\-\-conversion\-workspace\fR on the command line with a
fully specified name;
.IP "\(em" 2m
provide the argument \f5\-\-project\fR on the command line;
.IP "\(em" 2m
set the property \f5core/project\fR.
.RE
.sp

To set the \f5region\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5\-\-conversion\-workspace\fR on the command line with a
fully specified name;
.IP "\(em" 2m
provide the argument \f5\-\-region\fR on the command line.
.RE
.sp


.RS 2m
.TP 2m
\fB\-\-conversion\-workspace\fR=\fICONVERSION_WORKSPACE\fR

ID of the conversion_workspace or fully qualified identifier for the
conversion_workspace.

To set the \f5conversion_workspace\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5\-\-conversion\-workspace\fR on the command line.
.RE
.sp

.RE
.sp
.TP 2m
\fB\-\-display\-name\fR=\fIDISPLAY_NAME\fR

A user\-friendly name for the migration job. The display name can include
letters, numbers, spaces, and hyphens, and must start with a letter.

.TP 2m
\fB\-\-dump\-parallel\-level\fR=\fIDUMP_PARALLEL_LEVEL\fR

Parallelization level during initial dump of the migration job. If not
specified, will be defaulted to OPTIMAL. \fIDUMP_PARALLEL_LEVEL\fR must be one
of: \fBMIN\fR, \fBOPTIMAL\fR, \fBMAX\fR.

.TP 2m
\fB\-\-dump\-type\fR=\fIDUMP_TYPE\fR

The type of the data dump. Currently applicable for MySQL to MySQL migrations
only. \fIDUMP_TYPE\fR must be one of: \fBLOGICAL\fR, \fBPHYSICAL\fR.

.TP 2m
\fB\-\-filter\fR=\fIFILTER\fR

Filter the entities based on AIP\-160 (https://google.aip.dev/160) standard.
Example: to filter all tables whose name start with "Employee" and are present
under schema "Company", use filter as "Company.Employee\f5*\fR AND type=TABLE"

.TP 2m
\fB\-\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]

List of label KEY=VALUE pairs to add.

Keys must start with a lowercase character and contain only hyphens (\f5\-\fR),
underscores (\f5_\fR), lowercase characters, and numbers. Values must contain
only hyphens (\f5\-\fR), underscores (\f5_\fR), lowercase characters, and
numbers.

.TP 2m

The migration job objects config.


.RS 2m
.TP 2m

The migration job objects config for databases.

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-all\-databases\fR

Migrate all databases for the migration job. This flag is used only for Postgres
to AlloyDB migrations and Postgres to Cloud SQL Postgres migrations.

.TP 2m
\fB\-\-databases\-filter\fR=\fIdatabaseName\fR,[...]

A list of databases to be migrated to the destination instance. Provide
databases as a comma separated list. This flag is used only for Postgres to
AlloyDB migrations and Postgres to Cloud SQL Postgres migrations.

.RE
.RE
.sp
.TP 2m

Cmek key resource \- Name of the CMEK (customer\-managed encryption key) used
for the migration job The arguments 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 in other ways.

To set the \f5region\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5\-\-cmek\-key\fR on the command line with a fully
specified name;
.IP "\(em" 2m
provide the argument \f5\-\-region\fR on the command line.
.RE
.sp


.RS 2m
.TP 2m
\fB\-\-cmek\-key\fR=\fICMEK_KEY\fR

ID of the cmek\-key or fully qualified identifier for the cmek\-key.

To set the \f5cmek\-key\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5\-\-cmek\-key\fR on the command line.
.RE
.sp

This flag argument must be specified if any of the other arguments in this group
are specified.

.TP 2m
\fB\-\-cmek\-keyring\fR=\fICMEK_KEYRING\fR

The CMEK keyring id of the cmek\-key.

To set the \f5cmek\-keyring\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5\-\-cmek\-key\fR on the command line with a fully
specified name;
.IP "\(bu" 2m
provide the argument \f5\-\-cmek\-keyring\fR on the command line.
.RE
.sp

.TP 2m
\fB\-\-cmek\-project\fR=\fICMEK_PROJECT\fR

The Cloud project id for the cmek\-key.

To set the \f5cmek\-project\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5\-\-cmek\-key\fR on the command line with a fully
specified name;
.IP "\(bu" 2m
provide the argument \f5\-\-cmek\-project\fR on the command line.
.RE
.sp

.RE
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-dump\-flags\fR=[\fIKEY\fR=\fIVALUE\fR,...]

A list of dump flags. An object containing a list of "key": "value" pairs.

.TP 2m
\fB\-\-dump\-path\fR=\fIDUMP_PATH\fR

Path to the dump file in Google Cloud Storage, in the format:
\f5gs://[BUCKET_NAME]/[OBJECT_NAME]\fR.

.RE
.sp
.TP 2m

The heterogeneous migration config. This is used only for Oracle to Cloud SQL
for PostgreSQL and SQL Server to Cloud SQL for PostgreSQL migrations.


.RS 2m
.TP 2m

Configuration for Oracle or SQL Server as a source in a heterogeneous migration.


.RS 2m
.TP 2m
\fB\-\-max\-concurrent\-cdc\-connections\fR=\fIMAX_CONCURRENT_CDC_CONNECTIONS\fR

Maximum number of connections Database Migration Service will open to the source
for CDC phase.

.TP 2m
\fB\-\-max\-concurrent\-full\-dump\-connections\fR=\fIMAX_CONCURRENT_FULL_DUMP_CONNECTIONS\fR

Maximum number of connections Database Migration Service will open to the source
for full dump phase.

.TP 2m

Configuration for skipping full dump.


.RS 2m
.TP 2m
\fB\-\-skip\-full\-dump\fR

Whether to skip full dump or not.

.TP 2m

Configuration for CDC start position.

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-oracle\-cdc\-start\-position\fR=\fIORACLE_CDC_START_POSITION\fR

Oracle schema change number (SCN) to start CDC data migration from.

.TP 2m
\fB\-\-sqlserver\-cdc\-start\-position\fR=\fISQLSERVER_CDC_START_POSITION\fR

Sqlserver log squence number (LSN) to start CDC data migration from.

.RE
.RE
.RE
.sp
.TP 2m

Configuration for Postgres as a destination in a heterogeneous migration.


.RS 2m
.TP 2m
\fB\-\-max\-concurrent\-destination\-connections\fR=\fIMAX_CONCURRENT_DESTINATION_CONNECTIONS\fR

Maximum number of concurrent connections Database Migration Service will open to
the destination for data migration.

.TP 2m
\fB\-\-transaction\-timeout\fR=\fITRANSACTION_TIMEOUT\fR

Timeout for data migration transactions.

.RE
.RE
.sp
.TP 2m

The connectivity method used by the migration job. If a connectivity method
isn't specified, then it isn't added to the migration job.

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-peer\-vpc\fR=\fIPEER_VPC\fR

Name of the VPC network to peer with the Cloud SQL private network.

.TP 2m
\fB\-\-static\-ip\fR

Use the default IP allowlist method. This method creates a public IP that will
be used with the destination Cloud SQL database. The method works by configuring
the source database server to accept connections from the outgoing IP of the
Cloud SQL instance.

.TP 2m

Parameters for the reverse\-SSH tunnel connectivity method.


.RS 2m
.TP 2m
\fB\-\-vm\-ip\fR=\fIVM_IP\fR

Bastion Virtual Machine IP.

This flag argument must be specified if any of the other arguments in this group
are specified.

.TP 2m
\fB\-\-vm\-port\fR=\fIVM_PORT\fR

Forwarding port for the SSH tunnel.

This flag argument must be specified if any of the other arguments in this group
are specified.

.TP 2m
\fB\-\-vpc\fR=\fIVPC\fR

Name of the VPC network where the VM is hosted.

This flag argument must be specified if any of the other arguments in this group
are specified.

.TP 2m
\fB\-\-vm\fR=\fIVM\fR

Name of VM that will host the SSH tunnel bastion.

.RE
.RE
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m

The SQL Server homogeneous migration config. This is used only for SQL Server to
CloudSQL SQL Server migrations.


.RS 2m
.TP 2m
\fB\-\-sqlserver\-databases\fR=\fIdatabaseName\fR,[...]

A list of databases to be migrated to the destination Cloud SQL instance.
Provide databases as a comma separated list. This list should contain all
encrypted and non\-encrypted database names. This flag is used only for SQL
Server to Cloud SQL migrations.

This flag argument must be specified if any of the other arguments in this group
are specified.

.TP 2m
\fB\-\-sqlserver\-diff\-backup\fR

Enable differential backups. If not specified, differential backups are disabled
by default. Use \-\-sqlserver\-diff\-backup to enable and
\-\-no\-sqlserver\-diff\-backup to disable. This flag is used only for
homogeneous SQL Server to Cloud SQL for SQL Server migrations.

.TP 2m
\fB\-\-sqlserver\-encrypted\-databases\fR=\fISQLSERVER_ENCRYPTED_DATABASES\fR

A JSON/YAML file describing the encryption settings per database for all
encrytped databases. Note: Path to the Certificate (.cer) and Private Key (.pvk)
in Cloud Storage, should be in the form of \f5gs://bucketName/fileName\fR. The
instance must have write permissions to the bucket and read access to the file.
An example of a JSON request: [{ "database": "db1", "encryptionOptions": {
"certPath": "Path to certificate 1", "pvkPath": "Path to certificate private key
1", "pvkPassword": "Private key password 1" } }, { "database": "db2",
"encryptionOptions": { "certPath": "Path to certificate 2", "pvkPath": "Path to
certificate private key 2", "pvkPassword": "Private key password 2" } }]

.RS 2m
This flag accepts "\-" for stdin. This flag is used only for SQL Server to Cloud SQL migrations.
.RE

.TP 2m
\fB\-\-sqlserver\-promote\-when\-ready\fR

Promote the database when it is ready. Use \-\-sqlserver\-promote\-when\-ready
to enable and \-\-no\-sqlserver\-promote\-when\-ready to disable. This flag is
used only for homogeneous SQL Server to Cloud SQL for SQL Server migrations.


.RE
.RE
.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 variant is also available:

.RS 2m
$ gcloud alpha database\-migration migration\-jobs create
.RE