1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-08 10:35:03 +00:00
gcloud-help/gcloud/firestore/import

83 lines
2.7 KiB
Text
Raw Normal View History

2022-03-01 04:29:52 +00:00
NAME
gcloud firestore import - import Cloud Firestore documents from Google
Cloud Storage
SYNOPSIS
gcloud firestore import INPUT_URI_PREFIX [--async]
2023-01-19 00:56:33 +00:00
[--collection-ids=[COLLECTION_IDS,...]]
[--database=DATABASE; default="(default)"]
[--namespace-ids=[NAMESPACE_IDS,...]] [GCLOUD_WIDE_FLAG ...]
2022-03-01 04:29:52 +00:00
DESCRIPTION
2023-01-19 00:56:33 +00:00
import Cloud Firestore documents from Google Cloud Storage.
2022-03-01 04:29:52 +00:00
EXAMPLES
To import all collection groups from mybucket/my/path, run:
$ gcloud firestore import gs://mybucket/my/path
To import a specific set of collections groups asynchronously, run:
$ gcloud firestore import gs://mybucket/my/path \
--collection-ids='specific collection group1','specific
collection group2' --async
2023-01-19 00:56:33 +00:00
To import all collection groups from certain namespace, run:
$ gcloud firestore import gs://mybucket/my/path \
--namespace-ids='specific namespace id'
2022-03-01 04:29:52 +00:00
POSITIONAL ARGUMENTS
INPUT_URI_PREFIX
Location of the import files.
This location is the 'output_uri_prefix' field of a previous export,
and can be found via the 'gcloud firestore operations describe'
command.
FLAGS
--async
Return immediately, without waiting for the operation in progress to
complete.
--collection-ids=[COLLECTION_IDS,...]
2023-01-25 10:09:52 +00:00
List specifying which collections will be included in the operation.
2022-03-01 04:29:52 +00:00
When omitted, all collections are included.
2023-01-25 10:09:52 +00:00
For example, to operate on only the customers and orders collections:
2022-03-01 04:29:52 +00:00
$ gcloud firestore import --collection-ids='customers','orders'
2023-01-19 00:56:33 +00:00
--database=DATABASE; default="(default)"
The database to operate on. The default value is (default).
For example, to operate on database foo:
$ gcloud firestore import --database='foo'
--namespace-ids=[NAMESPACE_IDS,...]
2023-01-25 10:09:52 +00:00
List specifying which namespaces will be included in the operation.
2023-01-19 00:56:33 +00:00
When omitted, all namespaces are included.
This is only supported for Datastore Mode databases.
2023-01-25 10:09:52 +00:00
For example, to operate on only the customers and orders namespaces:
2023-01-19 00:56:33 +00:00
$ gcloud firestore import --namespaces-ids='customers','orders'
2022-03-01 04:29:52 +00:00
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
These variants are also available:
$ gcloud alpha firestore import
$ gcloud beta firestore import