gcloud_alpha_sql_instances_clone (1)
NAME
- gcloud alpha sql instances clone - clones a Cloud SQL instance
SYNOPSIS
-
gcloud alpha sql instances clone SOURCE DESTINATION [--async] [--bin-log-file-name=BIN_LOG_FILE_NAME] [--bin-log-position=BIN_LOG_POSITION] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) gcloud alpha sql instances clone creates a clone of the
The binary log coordinates, if specified, act as the point up to which the source instance is cloned. If not specified, the source instance is cloned up to the most recent binary log coordinates at the time the command is executed.
POSITIONAL ARGUMENTS
-
- SOURCE
-
Cloud SQL instance ID of the source.
- DESTINATION
-
Cloud SQL instance ID of the clone.
FLAGS
-
- --async
-
Display information about the operation in progress, without waiting for the
operation to complete.
- --bin-log-file-name=BIN_LOG_FILE_NAME
-
Represents the name of the binary log file created by the source instance if it
has binary logs enabled. If specified, is the point up to which the source
instance is cloned. It must be specified along with --bin-log-position to
form a valid binary log coordinates. e.g., mysql-bin.000001
- --bin-log-position=BIN_LOG_POSITION
-
Represents the position (offset) inside the binary log file created by the
source instance if it has binary logs enabled. If specified, is the point up to
which the source instance is cloned. It must be specified along with
--bin-log-file to form a valid binary log coordinates. e.g., 123 (a numeric
value)
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
EXAMPLES
To clone a source instance to the most recent binary log coordinates:
- $ gcloud alpha sql instances clone instance-foo instance-bar
or to clone at specific binary log coordinates:
-
$ gcloud alpha sql instances clone instance-foo instance-bar \
--bin-log-file-name mysql-bin.000020 --bin-log-position 170
NOTES
This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you will have to apply for early access and have your projects registered on the API whitelist to use it. To do so, contact Support at cloud.google.com/support These variants are also available:
- $ gcloud sql instances clone $ gcloud beta sql instances clone