mirror of
https://github.com/imjasonh/gcloud-help
synced 2026-07-08 10:35:03 +00:00
gcloud: Wed Jun 15 08:33:03 UTC 2022
This commit is contained in:
parent
28d031b3c1
commit
5378794555
147 changed files with 5222 additions and 263 deletions
|
|
@ -12,14 +12,35 @@ SYNOPSIS
|
|||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(ALPHA) Create a Database Migration Service migration job.
|
||||
(ALPHA) Create a Database Migration Service migration job. Recommended
|
||||
steps before creating the migration job:
|
||||
▪ Create a source connection profile. See prerequisites here
|
||||
(https://cloud.google.com/database-migration/docs/mysql/configure-source-database).
|
||||
▪ Create a destination connection profile.
|
||||
▪ Configure the connectivity method. See prerequisites here
|
||||
(https://cloud.google.com/database-migration/docs/mysql/configure-connectivity).
|
||||
|
||||
EXAMPLES
|
||||
To create a migration job with vpc peering connectivity:
|
||||
To create a continuous migration job with IP allowlist connectivity:
|
||||
|
||||
$ gcloud alpha database-migration migration-jobs create \
|
||||
MIGRATION_JOB --region=us-central1 --display-name=my-job \
|
||||
--source=cp1 --destination=cp2 --peer-vpc=network1
|
||||
my-migration-job --region=us-central1 --type=CONTINUOUS \
|
||||
--source=cp1 --destination=cp2
|
||||
|
||||
To create a continuous migration job with VPC peering connectivity:
|
||||
|
||||
$ gcloud alpha database-migration migration-jobs create \
|
||||
my-migration-job --region=us-central1 --type=CONTINUOUS \
|
||||
--source=cp1 --destination=cp2 \
|
||||
--peer-vpc=projects/my-project/global/networks/my-network
|
||||
|
||||
To create a one-time migration job with reverse-SSH tunnel connectivity:
|
||||
|
||||
$ gcloud alpha database-migration migration-jobs create \
|
||||
my-migration-job --region=us-central1 --type=ONE_TIME \
|
||||
--source=cp1 --destination=cp2 --vm=vm1 --vm-ip=1.1.1.1 \
|
||||
--vm-port=1111 \
|
||||
--vpc=projects/my-project/global/networks/my-network
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
Migration job resource - The migration job to create. The arguments in
|
||||
|
|
@ -48,10 +69,10 @@ POSITIONAL ARGUMENTS
|
|||
▸ provide the argument --region on the command line.
|
||||
|
||||
REQUIRED FLAGS
|
||||
Connection profile resource - Resource ID of the destination connection
|
||||
profile. 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:
|
||||
Connection profile resource - ID of the destination connection profile,
|
||||
representing thedestination 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;
|
||||
|
|
@ -67,10 +88,10 @@ REQUIRED FLAGS
|
|||
connection_profile. To set the connection_profile attribute:
|
||||
▸ provide the argument --destination on the command line.
|
||||
|
||||
Connection profile resource - Resource ID of the source connection
|
||||
profile. 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:
|
||||
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;
|
||||
|
|
@ -87,15 +108,16 @@ REQUIRED FLAGS
|
|||
▸ provide the argument --source on the command line.
|
||||
|
||||
--type=TYPE
|
||||
Type of the migration job (ONE_TIME or CONTINUOUS). TYPE must be one
|
||||
of: ONE_TIME, CONTINUOUS.
|
||||
Type of the migration job. TYPE must be one of: ONE_TIME, CONTINUOUS.
|
||||
|
||||
OPTIONAL FLAGS
|
||||
--no-async
|
||||
Waits for the operation in progress to complete before returning.
|
||||
|
||||
--display-name=DISPLAY_NAME
|
||||
Friendly name for the migration job.
|
||||
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-path=DUMP_PATH
|
||||
Path to the dump file in Google Cloud Storage, in the format:
|
||||
|
|
|
|||
|
|
@ -10,31 +10,43 @@ SYNOPSIS
|
|||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(ALPHA) Generate a SSH script for a Database Migration Service migration
|
||||
job.
|
||||
(ALPHA) Generate a script for a Database Migration Service migration job,
|
||||
to configure Reverse SSH tunnel connectivity with a bastion host on a
|
||||
Compute Engine VM instance. You can use an existing VM instance or create a
|
||||
new VM for this purpose.
|
||||
|
||||
Copy the generated script and run it in bash from a machine that has:
|
||||
▪ The gcloud command-line tool installed.
|
||||
▪ Access to your source database.
|
||||
▪ Access to the existing bastion VM, or permissions and access to the
|
||||
Cloud Compute API if creating a new bastion VM. Make sure this machine
|
||||
is available during the entire migration.
|
||||
|
||||
Running the script will set up the SSH tunnel on the VM you selected and
|
||||
will establish connectivity between the source database and the Cloud SQL
|
||||
instance. Find additional information here
|
||||
(https://cloud.google.com/database-migration/docs/mysql/configure-connectivity-reverse-ssh-tunnel).
|
||||
|
||||
EXAMPLES
|
||||
To generate a SSH script for a Database Migration Service migration job
|
||||
with vm creation config, run:
|
||||
To generate an SSH script with bastion VM instance creation:
|
||||
|
||||
$ gcloud alpha database-migration migration-jobs \
|
||||
generate-ssh-script my-migration-job --vm=sample-vm \
|
||||
--vm-port=1111 --vm-machine-type=n1-standard-1 \
|
||||
--vm-zone-create=us-central1-a --vpc=sample-vpc \
|
||||
generate-ssh-script my-migration-job --vm=vm1 --vm-port=1111 \
|
||||
--vm-machine-type=n1-standard-1 --vm-zone-create=us-central1-a \
|
||||
--vpc=projects/my-project/global/networks/my-network \
|
||||
--region=us-central1
|
||||
|
||||
To generate a SSH script for a Database Migration Service migration job
|
||||
with vm selection config, run:
|
||||
To generate an SSH script with an existing bastion VM instance:
|
||||
|
||||
$ gcloud alpha database-migration migration-jobs \
|
||||
generate-ssh-script my-migration-job --vm=sample-vm \
|
||||
--vm-port=1111 --vm-zone=us-central1-a --region=us-central1
|
||||
generate-ssh-script my-migration-job --vm=vm1 --vm-port=1111 \
|
||||
--vm-zone=us-central1-a --region=us-central1
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
Migration job resource - The migration job you want to generate SSH script
|
||||
for. 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:
|
||||
Migration job resource - The migration job to generate the SSH script for.
|
||||
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;
|
||||
|
|
@ -58,27 +70,28 @@ POSITIONAL ARGUMENTS
|
|||
|
||||
REQUIRED FLAGS
|
||||
--vm=VM
|
||||
Bastion VM Instance name to use or to create (if machineType is given).
|
||||
Bastion Compute Engine VM instance name to use or to create.
|
||||
|
||||
Exactly one of these must be specified:
|
||||
|
||||
--vm-zone=VM_ZONE
|
||||
Google Cloud Platform zone the VM is located in.
|
||||
Zone the existing bastion VM instance is located in.
|
||||
|
||||
--vm-machine-type=VM_MACHINE_TYPE
|
||||
VM instance machine type to create.
|
||||
Machine type for a new VM instance. To get a list of available
|
||||
machine types, run 'gcloud compute machine-types list'.
|
||||
|
||||
This flag must be specified if any of the other arguments in this
|
||||
group are specified.
|
||||
|
||||
--vpc=VPC
|
||||
VPC name the VM needs to be created in.
|
||||
VPC to create the VM instance in.
|
||||
|
||||
This flag must be specified if any of the other arguments in this
|
||||
group are specified.
|
||||
|
||||
--vm-zone-create=VM_ZONE_CREATE
|
||||
Google Cloud Platform zone to create the VM in.
|
||||
Zone to create the VM instance in.
|
||||
|
||||
OPTIONAL FLAGS
|
||||
--vm-port=VM_PORT
|
||||
|
|
|
|||
|
|
@ -14,14 +14,22 @@ SYNOPSIS
|
|||
|
||||
DESCRIPTION
|
||||
(ALPHA) 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 a migration job in draft with new display name, source and
|
||||
destination connection profiles:
|
||||
To update the source and destination connection profiles of a draft
|
||||
migration job:
|
||||
|
||||
$ gcloud alpha database-migration migration-jobs update \
|
||||
MIGRATION_JOB --region=us-central1 --display-name=new-name \
|
||||
--source=new-src --destination=new-dest
|
||||
my-migration-job --region=us-central1 --source=new-src \
|
||||
--destination=new-dest
|
||||
|
||||
To update the display name of a running migration job:
|
||||
|
||||
$ gcloud alpha 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
|
||||
|
|
@ -50,10 +58,10 @@ POSITIONAL ARGUMENTS
|
|||
▸ provide the argument --region on the command line.
|
||||
|
||||
FLAGS
|
||||
Connection profile resource - Resource ID of the destination connection
|
||||
profile. 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:
|
||||
Connection profile resource - ID of the destination connection profile,
|
||||
representing thedestination 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;
|
||||
|
|
@ -67,10 +75,10 @@ FLAGS
|
|||
connection_profile. To set the connection_profile attribute:
|
||||
▸ provide the argument --destination on the command line.
|
||||
|
||||
Connection profile resource - Resource ID of the source connection
|
||||
profile. 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:
|
||||
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;
|
||||
|
|
@ -88,15 +96,16 @@ FLAGS
|
|||
Waits for the operation in progress to complete before returning.
|
||||
|
||||
--display-name=DISPLAY_NAME
|
||||
Friendly name for the migration job.
|
||||
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-path=DUMP_PATH
|
||||
Path to the dump file in Google Cloud Storage, in the format:
|
||||
gs://[BUCKET_NAME]/[OBJECT_NAME].
|
||||
|
||||
--type=TYPE
|
||||
Type of the migration job (ONE_TIME or CONTINUOUS). TYPE must be one
|
||||
of: ONE_TIME, CONTINUOUS.
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue