.TH "GCLOUD_ALLOYDB_CLUSTERS_MIGRATE\-CLOUD\-SQL" 1 .SH "NAME" .HP gcloud alloydb clusters migrate\-cloud\-sql \- migrate Cloud SQL instance to an AlloyDB cluster using an existing Cloud SQL backup .SH "SYNOPSIS" .HP \f5gcloud alloydb clusters migrate\-cloud\-sql\fR \fICLUSTER\fR \fB\-\-cloud\-sql\-backup\-id\fR=\fICLOUD_SQL_BACKUP_ID\fR \fB\-\-cloud\-sql\-instance\-id\fR=\fICLOUD_SQL_INSTANCE_ID\fR \fB\-\-cloud\-sql\-project\-id\fR=\fICLOUD_SQL_PROJECT_ID\fR \fB\-\-password\fR=\fIPASSWORD\fR \fB\-\-region\fR=\fIREGION\fR [\fB\-\-allocated\-ip\-range\-name\fR=\fIALLOCATED_IP_RANGE_NAME\fR] [\fB\-\-async\fR] [\fB\-\-database\-version\fR=\fIDATABASE_VERSION\fR] [\fB\-\-enable\-private\-service\-connect\fR] [\fB\-\-network\fR=\fINETWORK\fR] [\fB\-\-subscription\-type\fR=\fISUBSCRIPTION_TYPE\fR] [\fB\-\-tags\fR=[\fIKEY\fR=\fIVALUE\fR,...]] [\fB\-\-continuous\-backup\-recovery\-window\-days\fR=\fIRECOVERY_PERIOD\fR\ \fB\-\-enable\-continuous\-backup\fR\ [\fB\-\-continuous\-backup\-encryption\-key\fR=\fICONTINUOUS_BACKUP_ENCRYPTION_KEY\fR\ :\ \fB\-\-continuous\-backup\-encryption\-key\-keyring\fR=\fICONTINUOUS_BACKUP_ENCRYPTION_KEY_KEYRING\fR\ \fB\-\-continuous\-backup\-encryption\-key\-location\fR=\fICONTINUOUS_BACKUP_ENCRYPTION_KEY_LOCATION\fR\ \fB\-\-continuous\-backup\-encryption\-key\-project\fR=\fICONTINUOUS_BACKUP_ENCRYPTION_KEY_PROJECT\fR]] [\fB\-\-deny\-maintenance\-period\-end\-date\fR=\fIDENY_MAINTENANCE_PERIOD_END_DATE\fR\ \fB\-\-deny\-maintenance\-period\-start\-date\fR=\fIDENY_MAINTENANCE_PERIOD_START_DATE\fR\ \fB\-\-deny\-maintenance\-period\-time\fR=\fIDENY_MAINTENANCE_PERIOD_TIME\fR] [\fB\-\-disable\-automated\-backup\fR\ |\ [\fB\-\-automated\-backup\-days\-of\-week\fR=[\fIDAYS_OF_WEEK\fR,...]\ \fB\-\-automated\-backup\-start\-times\fR=[\fISTART_TIMES\fR,...]\ :\ \fB\-\-automated\-backup\-window\fR=\fITIMEOUT_PERIOD\fR\ [\fB\-\-automated\-backup\-encryption\-key\fR=\fIAUTOMATED_BACKUP_ENCRYPTION_KEY\fR\ :\ \fB\-\-automated\-backup\-encryption\-key\-keyring\fR=\fIAUTOMATED_BACKUP_ENCRYPTION_KEY_KEYRING\fR\ \fB\-\-automated\-backup\-encryption\-key\-location\fR=\fIAUTOMATED_BACKUP_ENCRYPTION_KEY_LOCATION\fR\ \fB\-\-automated\-backup\-encryption\-key\-project\fR=\fIAUTOMATED_BACKUP_ENCRYPTION_KEY_PROJECT\fR]\ \fB\-\-automated\-backup\-retention\-count\fR=\fIRETENTION_COUNT\fR\ |\ \fB\-\-automated\-backup\-retention\-period\fR=\fIRETENTION_PERIOD\fR]] [\fB\-\-kms\-key\fR=\fIKMS_KEY\fR\ :\ \fB\-\-kms\-keyring\fR=\fIKMS_KEYRING\fR\ \fB\-\-kms\-location\fR=\fIKMS_LOCATION\fR\ \fB\-\-kms\-project\fR=\fIKMS_PROJECT\fR] [\fB\-\-maintenance\-window\-day\fR=\fIMAINTENANCE_WINDOW_DAY\fR\ \fB\-\-maintenance\-window\-hour\fR=\fIMAINTENANCE_WINDOW_HOUR\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR] .SH "DESCRIPTION" Migrate Cloud SQL instance to an AlloyDB cluster using an existing Cloud SQL backup. .SH "EXAMPLES" To migrate a Cloud SQL instance to an AlloyDB cluster from a backup, run: .RS 2m $ gcloud alloydb clusters migrate\-cloud\-sql my\-alloydb\-cluster \e \-\-region=us\-central1 \e \-\-cloud\-sql\-project\-id=my\-cloud\-sql\-project\-id \e \-\-cloud\-sql\-instance\-id=my\-cloud\-sql\-cluster\-id \e \-\-cloud\-sql\-backup\-id=my\-cloud\-sql\-backup\-id .RE .SH "POSITIONAL ARGUMENTS" .RS 2m .TP 2m \fICLUSTER\fR AlloyDB cluster ID .RE .sp .SH "REQUIRED FLAGS" .RS 2m .TP 2m Migrate Cloud SQL strategy. This must be specified. .RS 2m .TP 2m Migrate CloudSQL instance to an AlloyDB cluster by restoring from an existing backup. .TP 2m \fB\-\-cloud\-sql\-backup\-id\fR=\fICLOUD_SQL_BACKUP_ID\fR CloudSQL backup ID to migrate from. This must be the backup ID (myBackup). .RE .sp .TP 2m \fB\-\-cloud\-sql\-instance\-id\fR=\fICLOUD_SQL_INSTANCE_ID\fR CloudSQL instance ID to migrate from. This must be the instance ID (myInstance). .TP 2m \fB\-\-cloud\-sql\-project\-id\fR=\fICLOUD_SQL_PROJECT_ID\fR CloudSQL project to migrate from. This must be the project ID (myProject). .TP 2m \fB\-\-password\fR=\fIPASSWORD\fR Initial postgres user password to set up during cluster creation. .TP 2m \fB\-\-region\fR=\fIREGION\fR Regional location (e.g. \f5asia\-east1\fR, \f5us\-east1\fR). See the full list of regions at https://cloud.google.com/sql/docs/instance\-locations. .RE .sp .SH "OPTIONAL FLAGS" .RS 2m .TP 2m \fB\-\-allocated\-ip\-range\-name\fR=\fIALLOCATED_IP_RANGE_NAME\fR Name of the allocated IP range for the private IP AlloyDB cluster, for example: "google\-managed\-services\-default". If set, the instance IPs for this cluster will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1\-63 characters long and match the regular expression \f5[a\-z]([\-a\-z0\-9]*[a\-z0\-9])?\fR. .TP 2m \fB\-\-async\fR Return immediately, without waiting for the operation in progress to complete. .TP 2m \fB\-\-database\-version\fR=\fIDATABASE_VERSION\fR Database version of the cluster. \fIDATABASE_VERSION\fR must be one of: \fBPOSTGRES_14\fR, \fBPOSTGRES_15\fR, \fBPOSTGRES_16\fR, \fBPOSTGRES_17\fR, \fBPOSTGRES_18\fR. .TP 2m \fB\-\-enable\-private\-service\-connect\fR Enable Private Service Connect (PSC) connectivity for the cluster. .TP 2m \fB\-\-network\fR=\fINETWORK\fR Network in the current project that the instance will be part of. To specify using a network with a shared VPC, use the full URL of the network. For an example host project, \f5testproject\fR, and shared network, \f5testsharednetwork\fR, this would be of the form:\f5\-\-network=projects/testproject/global/networks/testsharednetwork\fR .TP 2m \fB\-\-subscription\-type\fR=\fISUBSCRIPTION_TYPE\fR Subscription type of the cluster. \fISUBSCRIPTION_TYPE\fR must be one of: \fBSTANDARD\fR, \fBTRIAL\fR. .TP 2m \fB\-\-tags\fR=[\fIKEY\fR=\fIVALUE\fR,...] List of tags KEY=VALUE pairs to bind. Each item must be expressed as \f5=\fR. Example: \f5123/environment=production,123/costCenter=marketing\fR .TP 2m Continuous Backup configuration. If unspecified, continuous backups are enabled. .TP 2m \fB\-\-continuous\-backup\-recovery\-window\-days\fR=\fIRECOVERY_PERIOD\fR Recovery window of the log files and backups saved to support Continuous Backups. .TP 2m \fB\-\-enable\-continuous\-backup\fR Enables Continuous Backups on the cluster. .TP 2m Key resource \- The Cloud KMS (Key Management Service) cryptokey that will be used to protect the continuous backup. The 'AlloyDB Service Agent's service account must hold permission 'Cloud KMS CryptoKey Encrypter/Decrypter'. The arguments in this group can be used to specify the attributes of this resource. .TP 2m \fB\-\-continuous\-backup\-encryption\-key\fR=\fICONTINUOUS_BACKUP_ENCRYPTION_KEY\fR ID of the key or fully qualified identifier for the key. To set the \f5kms\-key\fR attribute: .RS 2m .IP "\(em" 2m provide the argument \f5\-\-continuous\-backup\-encryption\-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\-\-continuous\-backup\-encryption\-key\-keyring\fR=\fICONTINUOUS_BACKUP_ENCRYPTION_KEY_KEYRING\fR The KMS keyring of the key. To set the \f5kms\-keyring\fR attribute: .RS 2m .IP "\(em" 2m provide the argument \f5\-\-continuous\-backup\-encryption\-key\fR on the command line with a fully specified name; .IP "\(em" 2m provide the argument \f5\-\-continuous\-backup\-encryption\-key\-keyring\fR on the command line. .RE .sp .TP 2m \fB\-\-continuous\-backup\-encryption\-key\-location\fR=\fICONTINUOUS_BACKUP_ENCRYPTION_KEY_LOCATION\fR The Google Cloud location for the key. To set the \f5kms\-location\fR attribute: .RS 2m .IP "\(em" 2m provide the argument \f5\-\-continuous\-backup\-encryption\-key\fR on the command line with a fully specified name; .IP "\(em" 2m provide the argument \f5\-\-continuous\-backup\-encryption\-key\-location\fR on the command line. .RE .sp .TP 2m \fB\-\-continuous\-backup\-encryption\-key\-project\fR=\fICONTINUOUS_BACKUP_ENCRYPTION_KEY_PROJECT\fR The Google Cloud project for the key. To set the \f5kms\-project\fR attribute: .RS 2m .IP "\(em" 2m provide the argument \f5\-\-continuous\-backup\-encryption\-key\fR on the command line with a fully specified name; .IP "\(em" 2m provide the argument \f5\-\-continuous\-backup\-encryption\-key\-project\fR on the command line; .IP "\(em" 2m set the property \f5core/project\fR. .RE .sp .TP 2m Specify preferred day and time for maintenance deny period. .TP 2m \fB\-\-deny\-maintenance\-period\-end\-date\fR=\fIDENY_MAINTENANCE_PERIOD_END_DATE\fR Date when the deny maintenance period ends, that is 2020\-11\-01 or 11\-01 for recurring. This flag argument must be specified if any of the other arguments in this group are specified. .TP 2m \fB\-\-deny\-maintenance\-period\-start\-date\fR=\fIDENY_MAINTENANCE_PERIOD_START_DATE\fR Date when the deny maintenance period begins, that is 2020\-11\-01 or 11\-01 for recurring. This flag argument must be specified if any of the other arguments in this group are specified. .TP 2m \fB\-\-deny\-maintenance\-period\-time\fR=\fIDENY_MAINTENANCE_PERIOD_TIME\fR Time when the deny maintenance period starts and ends, for example 05:00, in UTC time zone. This flag argument must be specified if any of the other arguments in this group are specified. .TP 2m Automated backup policy. If unspecified, automated backups are disabled. At most one of these can be specified: .RS 2m .TP 2m \fB\-\-disable\-automated\-backup\fR Disables automated backups on the cluster. .TP 2m Or at least one of these can be specified: .RS 2m .TP 2m Enable automated backup policy. .TP 2m \fB\-\-automated\-backup\-days\-of\-week\fR=[\fIDAYS_OF_WEEK\fR,...] Comma\-separated list of days of the week to perform a backup. At least one day of the week must be provided. (e.g., \-\-automated\-backup\-days\-of\-week=MONDAY,WEDNESDAY,SUNDAY). \fIDAYS_OF_WEEK\fR must be one of: \fBMONDAY\fR, \fBTUESDAY\fR, \fBWEDNESDAY\fR, \fBTHURSDAY\fR, \fBFRIDAY\fR, \fBSATURDAY\fR, \fBSUNDAY\fR. This flag argument must be specified if any of the other arguments in this group are specified. .TP 2m \fB\-\-automated\-backup\-start\-times\fR=[\fISTART_TIMES\fR,...] Comma\-separated list of times during the day to start a backup. At least one start time must be provided. The start times are assumed to be in UTC and required to be an exact hour in the format HH:00. (e.g., \f5\-\-automated\-backup\-start\-times=01:00,13:00\fR) This flag argument must be specified if any of the other arguments in this group are specified. .TP 2m \fB\-\-automated\-backup\-window\fR=\fITIMEOUT_PERIOD\fR Length of the time window beginning at start time during which a backup can be taken. If a backup does not succeed within this time window, it will be canceled and considered failed. The backup window must be at least 5 minutes long. There is no upper bound on the window. If not set, it will default to 1 hour. .TP 2m Key resource \- The Cloud KMS (Key Management Service) cryptokey that will be used to protect the automated backups. The 'AlloyDB Service Agent' service account must hold permission 'Cloud KMS CryptoKey Encrypter/Decrypter'. The arguments in this group can be used to specify the attributes of this resource. .TP 2m \fB\-\-automated\-backup\-encryption\-key\fR=\fIAUTOMATED_BACKUP_ENCRYPTION_KEY\fR ID of the key or fully qualified identifier for the key. To set the \f5kms\-key\fR attribute: .RS 2m .IP "\(em" 2m provide the argument \f5\-\-automated\-backup\-encryption\-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\-\-automated\-backup\-encryption\-key\-keyring\fR=\fIAUTOMATED_BACKUP_ENCRYPTION_KEY_KEYRING\fR The KMS keyring of the key. To set the \f5kms\-keyring\fR attribute: .RS 2m .IP "\(em" 2m provide the argument \f5\-\-automated\-backup\-encryption\-key\fR on the command line with a fully specified name; .IP "\(em" 2m provide the argument \f5\-\-automated\-backup\-encryption\-key\-keyring\fR on the command line. .RE .sp .TP 2m \fB\-\-automated\-backup\-encryption\-key\-location\fR=\fIAUTOMATED_BACKUP_ENCRYPTION_KEY_LOCATION\fR The Google Cloud location for the key. To set the \f5kms\-location\fR attribute: .RS 2m .IP "\(em" 2m provide the argument \f5\-\-automated\-backup\-encryption\-key\fR on the command line with a fully specified name; .IP "\(em" 2m provide the argument \f5\-\-automated\-backup\-encryption\-key\-location\fR on the command line. .RE .sp .TP 2m \fB\-\-automated\-backup\-encryption\-key\-project\fR=\fIAUTOMATED_BACKUP_ENCRYPTION_KEY_PROJECT\fR The Google Cloud project for the key. To set the \f5kms\-project\fR attribute: .RS 2m .IP "\(em" 2m provide the argument \f5\-\-automated\-backup\-encryption\-key\fR on the command line with a fully specified name; .IP "\(em" 2m provide the argument \f5\-\-automated\-backup\-encryption\-key\-project\fR on the command line; .IP "\(em" 2m set the property \f5core/project\fR. .RE .sp .TP 2m Retention policy. If no retention policy is provided, all automated backups will be retained. At most one of these can be specified: .RS 2m .TP 2m \fB\-\-automated\-backup\-retention\-count\fR=\fIRETENTION_COUNT\fR Number of most recent successful backups retained. .TP 2m \fB\-\-automated\-backup\-retention\-period\fR=\fIRETENTION_PERIOD\fR Retention period of the backup relative to creation time. See \f5$ gcloud topic datetimes\fR for information on duration formats. .RE .RE .RE .sp .TP 2m Key resource \- The Cloud KMS (Key Management Service) cryptokey that will be used to protect the cluster. The 'AlloyDB Service Agent' service account must hold permission 'Cloud KMS CryptoKey Encrypter/Decrypter'. The arguments in this group can be used to specify the attributes of this resource. .TP 2m \fB\-\-kms\-key\fR=\fIKMS_KEY\fR ID of the key or fully qualified identifier for the key. To set the \f5kms\-key\fR attribute: .RS 2m .IP "\(em" 2m provide the argument \f5\-\-kms\-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\-\-kms\-keyring\fR=\fIKMS_KEYRING\fR The KMS keyring of the key. To set the \f5kms\-keyring\fR attribute: .RS 2m .IP "\(em" 2m provide the argument \f5\-\-kms\-key\fR on the command line with a fully specified name; .IP "\(em" 2m provide the argument \f5\-\-kms\-keyring\fR on the command line. .RE .sp .TP 2m \fB\-\-kms\-location\fR=\fIKMS_LOCATION\fR The Google Cloud location for the key. To set the \f5kms\-location\fR attribute: .RS 2m .IP "\(em" 2m provide the argument \f5\-\-kms\-key\fR on the command line with a fully specified name; .IP "\(em" 2m provide the argument \f5\-\-kms\-location\fR on the command line. .RE .sp .TP 2m \fB\-\-kms\-project\fR=\fIKMS_PROJECT\fR The Google Cloud project for the key. To set the \f5kms\-project\fR attribute: .RS 2m .IP "\(em" 2m provide the argument \f5\-\-kms\-key\fR on the command line with a fully specified name; .IP "\(em" 2m provide the argument \f5\-\-kms\-project\fR on the command line; .IP "\(em" 2m set the property \f5core/project\fR. .RE .sp .TP 2m Specify preferred day and time for maintenance. .TP 2m \fB\-\-maintenance\-window\-day\fR=\fIMAINTENANCE_WINDOW_DAY\fR Day of week for maintenance window, in UTC time zone. \fIMAINTENANCE_WINDOW_DAY\fR must be one of: \fBMONDAY\fR, \fBTUESDAY\fR, \fBWEDNESDAY\fR, \fBTHURSDAY\fR, \fBFRIDAY\fR, \fBSATURDAY\fR, \fBSUNDAY\fR. This flag argument must be specified if any of the other arguments in this group are specified. .TP 2m \fB\-\-maintenance\-window\-hour\fR=\fIMAINTENANCE_WINDOW_HOUR\fR Hour of day for maintenance window, in UTC time zone. This flag argument must be specified if any of the other arguments in this group are specified. .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" These variants are also available: .RS 2m $ gcloud alpha alloydb clusters migrate\-cloud\-sql .RE .RS 2m $ gcloud beta alloydb clusters migrate\-cloud\-sql .RE