mirror of
https://github.com/imjasonh/gcloud-help
synced 2026-07-18 14:56:05 +00:00
gcloud: Thu Jan 19 00:56:33 UTC 2023
This commit is contained in:
parent
348d9760ee
commit
1248f773ec
1462 changed files with 51835 additions and 5402 deletions
71
gcloud/alpha/spanner/migration/schema-and-data
Normal file
71
gcloud/alpha/spanner/migration/schema-and-data
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
NAME
|
||||
gcloud alpha spanner migration schema-and-data - migrate data from a source
|
||||
database to Cloud Spanner given a schema
|
||||
|
||||
SYNOPSIS
|
||||
gcloud alpha spanner migration schema-and-data --source=SOURCE [--dry-run]
|
||||
[--log-level=LOG_LEVEL] [--prefix=PREFIX] [--skip-foreign-keys]
|
||||
[--source-profile=SOURCE_PROFILE] [--target=TARGET]
|
||||
[--target-profile=TARGET_PROFILE] [--write-limit=WRITE_LIMIT]
|
||||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(ALPHA) Migrate data from a source database to Cloud Spanner given a
|
||||
schema.
|
||||
|
||||
EXAMPLES
|
||||
To generate schema and copy data to Cloud Spanner from a source database:
|
||||
|
||||
$ gcloud alpha spanner migration schema-and-data \
|
||||
--source=postgresql < ~/cart.pg_dump \
|
||||
--target-profile='instance=spanner-instance'
|
||||
|
||||
REQUIRED FLAGS
|
||||
--source=SOURCE
|
||||
Flag for specifying source database (e.g., PostgreSQL, MySQL,
|
||||
DynamoDB).
|
||||
|
||||
OPTIONAL FLAGS
|
||||
--dry-run
|
||||
Flag for generating DDL and schema conversion report without creating a
|
||||
Cloud Spanner database.
|
||||
|
||||
--log-level=LOG_LEVEL
|
||||
To configure the log level for the execution (INFO, VERBOSE).
|
||||
|
||||
--prefix=PREFIX
|
||||
File prefix for generated files.
|
||||
|
||||
--skip-foreign-keys
|
||||
Skip creating foreign keys after data migration is complete.
|
||||
|
||||
--source-profile=SOURCE_PROFILE
|
||||
Flag for specifying connection profile for source database (e.g.,
|
||||
"file=<path>,format=dump").
|
||||
|
||||
--target=TARGET
|
||||
Specifies the target database, defaults to Spanner (accepted values:
|
||||
Spanner) (default "Spanner").
|
||||
|
||||
--target-profile=TARGET_PROFILE
|
||||
Flag for specifying connection profile for target database (e.g.,
|
||||
"dialect=postgresql)".
|
||||
|
||||
--write-limit=WRITE_LIMIT
|
||||
Number of parallel writers to Cloud Spanner during bulk data migrations
|
||||
(default 40).
|
||||
|
||||
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 command is currently in alpha and might change without notice. If this
|
||||
command fails with API permission errors despite specifying the correct
|
||||
project, you might be trying to access an API with an invitation-only early
|
||||
access allowlist.
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue