1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-08 10:35:03 +00:00
gcloud-help/gcloud/database-migration/migration-jobs/update
2024-08-28 09:41:07 +00:00

247 lines
9.9 KiB
Text

NAME
gcloud database-migration migration-jobs update - update a Database
Migration Service migration job
SYNOPSIS
gcloud database-migration migration-jobs update
(MIGRATION_JOB : --region=REGION) [--no-async] [--commit-id=COMMIT_ID]
[--destination=DESTINATION] [--display-name=DISPLAY_NAME]
[--dump-parallel-level=DUMP_PARALLEL_LEVEL] [--dump-path=DUMP_PATH]
[--dump-type=DUMP_TYPE] [--filter=FILTER] [--source=SOURCE]
[--type=TYPE] [--update-labels=[KEY=VALUE,...]]
[--clear-labels | --remove-labels=[KEY,...]]
[--peer-vpc=PEER_VPC | --static-ip
| --vm=VM --vm-ip=VM_IP --vm-port=VM_PORT --vpc=VPC]
[--sqlserver-databases=databaseName,[...] --sqlserver-diff-backup
--sqlserver-encrypted-databases=SQLSERVER_ENCRYPTED_DATABASES]
[GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Update a Database Migration Service migration job.
▪ Draft migration job: user can update all available flags.
▪ Any other state can only update flags: --display-name, --dump-path,
and connectivity method flags.
EXAMPLES
To update the source and destination connection profiles of a draft
migration job:
$ gcloud database-migration migration-jobs update my-migration-job \
--region=us-central1 --source=new-src --destination=new-dest
To update the display name of a running migration job:
$ gcloud database-migration migration-jobs update my-migration-job \
--region=us-central1 --display-name=new-name
POSITIONAL ARGUMENTS
Migration job resource - The migration job to update. 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 project attribute:
◆ provide the argument migration_job on the command line with a fully
specified name;
◆ provide the argument --project on the command line;
◆ set the property core/project.
This must be specified.
MIGRATION_JOB
ID of the migration_job or fully qualified identifier for the
migration_job.
To set the migration_job attribute:
▸ provide the argument migration_job on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--region=REGION
The Cloud region for the migration_job.
To set the region attribute:
▸ provide the argument migration_job on the command line with a
fully specified name;
▸ provide the argument --region on the command line.
FLAGS
--no-async
Waits for the operation in progress to complete before returning.
--commit-id=COMMIT_ID
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.
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 project attribute:
◆ provide the argument --destination on the command line with a fully
specified name;
◆ provide the argument --project on the command line;
◆ set the property core/project.
To set the region attribute:
◆ provide the argument --destination on the command line with a fully
specified name;
◆ provide the argument --region on the command line.
--destination=DESTINATION
ID of the connection_profile or fully qualified identifier for the
connection_profile.
To set the connection_profile attribute:
▸ provide the argument --destination on the command line.
--display-name=DISPLAY_NAME
A user-friendly name for the migration job. The display name can
include letters, numbers, spaces, and hyphens, and must start with a
letter.
--dump-parallel-level=DUMP_PARALLEL_LEVEL
Parallelization level during initial dump of the migration job. If not
specified, will be defaulted to OPTIMAL. DUMP_PARALLEL_LEVEL must be
one of: MIN, OPTIMAL, MAX.
--dump-path=DUMP_PATH
Path to the dump file in Google Cloud Storage, in the format:
gs://[BUCKET_NAME]/[OBJECT_NAME].
--dump-type=DUMP_TYPE
The type of the data dump. Currently applicable for MySQL to MySQL
migrations only. DUMP_TYPE must be one of: LOGICAL, PHYSICAL.
--filter=FILTER
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* AND type=TABLE"
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 project attribute:
◆ provide the argument --source on the command line with a fully
specified name;
◆ provide the argument --project on the command line;
◆ set the property core/project.
To set the region attribute:
◆ provide the argument --source on the command line with a fully
specified name;
◆ provide the argument --region on the command line.
--source=SOURCE
ID of the connection_profile or fully qualified identifier for the
connection_profile.
To set the connection_profile attribute:
▸ provide the argument --source on the command line.
--type=TYPE
Type of the migration job. TYPE must be one of: ONE_TIME, CONTINUOUS.
--update-labels=[KEY=VALUE,...]
List of label KEY=VALUE pairs to update. If a label exists, its value
is modified. Otherwise, a new label is created.
Keys must start with a lowercase character and contain only hyphens
(-), underscores (_), lowercase characters, and numbers. Values must
contain only hyphens (-), underscores (_), lowercase characters, and
numbers.
At most one of these can be specified:
--clear-labels
Remove all labels. If --update-labels is also specified then
--clear-labels is applied first.
For example, to remove all labels:
$ gcloud database-migration migration-jobs update --clear-labels
To remove all existing labels and create two new labels, foo and baz:
$ gcloud database-migration migration-jobs update --clear-labels \
--update-labels foo=bar,baz=qux
--remove-labels=[KEY,...]
List of label keys to remove. If a label does not exist it is
silently ignored. If --update-labels is also specified then
--update-labels is applied first.
The connectivity method used by the migration job. If a connectivity
method isn't specified, then it isn't updated for the migration job.
At most one of these can be specified:
--peer-vpc=PEER_VPC
Name of the VPC network to peer with the Cloud SQL private network.
--static-ip
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.
Parameters for the reverse-SSH tunnel connectivity method.
--vm=VM
Name of VM that will host the SSH tunnel bastion.
--vm-ip=VM_IP
Bastion Virtual Machine IP.
--vm-port=VM_PORT
Forwarding port for the SSH tunnel.
--vpc=VPC
Name of the VPC network where the VM is hosted.
The SQL Server homogeneous migration config. This is used only for SQL
Server to CloudSQL SQL Server migrations.
--sqlserver-databases=databaseName,[...]
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.
--sqlserver-diff-backup
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.
--sqlserver-encrypted-databases=SQLSERVER_ENCRYPTED_DATABASES
A JSON/YAML file describing the encryption settings per database for
all encrytped databases. 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" } }]
This flag accepts "-" for stdin. This flag is used only for SQL Server to Cloud SQL migrations.
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 variant is also available:
$ gcloud alpha database-migration migration-jobs update