mirror of
https://github.com/imjasonh/gcloud-help
synced 2026-07-08 18:45:13 +00:00
97 lines
3.8 KiB
Text
97 lines
3.8 KiB
Text
NAME
|
|
gcloud alpha datastore import - import Cloud Datastore entities from Google
|
|
Cloud Storage
|
|
|
|
SYNOPSIS
|
|
gcloud alpha datastore import INPUT_URL [--async] [--kinds=[KIND,...]]
|
|
[--namespaces=[NAMESPACE,...]]
|
|
[--operation-labels=[OPERATION_LABEL,...]] [GCLOUD_WIDE_FLAG ...]
|
|
|
|
DESCRIPTION
|
|
(ALPHA) Imports entities into Google Cloud Datastore. Existing entities
|
|
with the same key are overwritten. The import occurs in the background and
|
|
its progress can be monitored and managed via the Operation resource that
|
|
is created. If an Import operation is cancelled, it is possible that a
|
|
subset of the data has already been imported to Cloud Datastore. This data
|
|
will not be removed.
|
|
|
|
EXAMPLES
|
|
To import all data exported to the output URL
|
|
gs://exampleBucket/exampleExport/exampleExport.overall_export_metadata,
|
|
run:
|
|
|
|
$ gcloud alpha datastore import \
|
|
gs://exampleBucket/exampleExport/\
|
|
exampleExport.overall_export_metadata
|
|
|
|
To import all data exported to the output URL
|
|
gs://exampleBucket/exampleExport/exampleExport.overall_export_metadata
|
|
without waiting for the operation to complete, run:
|
|
|
|
$ gcloud alpha datastore import \
|
|
gs://exampleBucket/exampleExport/\
|
|
exampleExport.overall_export_metadata --async
|
|
|
|
To import only the exampleKind from the data exported to the output URL
|
|
gs://exampleBucket/exampleExport/exampleExport.overall_export_metadata,
|
|
run:
|
|
|
|
$ gcloud alpha datastore import \
|
|
gs://exampleBucket/exampleExport/\
|
|
exampleExport.overall_export_metadata --kinds='exampleKind'
|
|
|
|
POSITIONAL ARGUMENTS
|
|
INPUT_URL
|
|
Location of the import metadata. Must be a valid Google Cloud Storage
|
|
object. The file extension is 'overall_export_metadata'.
|
|
|
|
This location is the 'output_url' field of a previous export, and can
|
|
be found via the 'operations describe' command.
|
|
|
|
FLAGS
|
|
--async
|
|
Return immediately, without waiting for the operation in progress to
|
|
complete.
|
|
|
|
--kinds=[KIND,...]
|
|
A list specifying what kinds will be included in the operation. When
|
|
omitted, all Kinds are included. For example, to operate on only the
|
|
'Customer' and 'Order' Kinds:
|
|
|
|
$ gcloud alpha datastore import --kinds='Customer','Order'
|
|
|
|
--namespaces=[NAMESPACE,...]
|
|
A list specifying what namespaces will be included in the operation.
|
|
When omitted, all namespaces are included in the operation, including
|
|
the default namespace. To specify that only the default namespace
|
|
should be operated on, use the special symbol '(default)'. For example,
|
|
to operate on entities from both the 'customers' and default
|
|
namespaces:
|
|
|
|
$ gcloud alpha datastore import --namespaces='(default)','customers'
|
|
|
|
--operation-labels=[OPERATION_LABEL,...]
|
|
A string:string map of custom labels to associate with this operation.
|
|
For example:
|
|
|
|
$ gcloud alpha datastore import \
|
|
--operation-labels=comment='customer orders','sales rep'=pending
|
|
|
|
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. These variants are also available:
|
|
|
|
$ gcloud datastore import
|
|
|
|
$ gcloud beta datastore import
|
|
|