gcloud alpha firestore import Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud alpha firestore import - import Cloud Firestore documents from Google Cloud Storage
- SYNOPSIS
gcloud alpha firestore importINPUT_URI_PREFIX[--async][--collection-ids=[COLLECTION_GROUP_IDS,…]][--database=DATABASE; default="(default)"][--namespace-ids=[NAMESPACE_IDS,…]][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(ALPHA)import Cloud Firestore documents from Google Cloud Storage.- EXAMPLES
- To import all collection groups from
mybucket/my/path, run:gcloudalphafirestoreimportgs://mybucket/my/pathTo import a specific set of collections groups asynchronously, run:
gcloudalphafirestoreimportgs://mybucket/my/path--collection-ids='specific collection group1','specificcollection group2'--asyncTo import all collection groups from certain namespace, run:
gcloudalphafirestoreimportgs://mybucket/my/path--namespace-ids='specific namespace id' - POSITIONAL ARGUMENTS
INPUT_URI_PREFIX- Location of the import files.
This location is the 'output_uri_prefix' field of a previous export, and can befound via the 'gcloud alpha firestore operations describe' command.
- FLAGS
--async- Return immediately, without waiting for the operation in progress to complete.
--collection-ids=[COLLECTION_GROUP_IDS,…]- List specifying which collection groups will be included in the operation. Whenomitted, all collection groups are included.
For example, to operate on only the
customersandorderscollections groups:gcloudalphafirestoreimport--collection-ids='customers','orders' --database=DATABASE; default="(default)"- The database to operate on. The default value is
(default).For example, to operate on database
foo:gcloudalphafirestoreimport--database='foo' --namespace-ids=[NAMESPACE_IDS,…]- List specifying which namespaces will be included in the operation. Whenomitted, all namespaces are included.
This is only supported for Datastore Mode databases.
For example, to operate on only the
customersandordersnamespaces:gcloudalphafirestoreimport--namespaces-ids='customers','orders'
- 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 helpfor details. - NOTES
- This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. These variants are also available:
gcloudfirestoreimportgcloudbetafirestoreimport
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-11-18 UTC.