gcloud alpha firestore export Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud alpha firestore export - export Cloud Firestore documents to Google Cloud Storage
- SYNOPSIS
gcloud alpha firestore exportOUTPUT_URI_PREFIX[--async][--collection-ids=[COLLECTION_GROUP_IDS,…]][--database=DATABASE; default="(default)"][--namespace-ids=[NAMESPACE_IDS,…]][--snapshot-time=SNAPSHOT_TIME][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(ALPHA)export Cloud Firestore documents to Google Cloud Storage.- EXAMPLES
- To export all collection groups to
mybucketin objects prefixedwithmy/path, run:gcloudalphafirestoreexportgs://mybucket/my/pathTo export a specific set of collections groups asynchronously, run:
gcloudalphafirestoreexportgs://mybucket/my/path--collection-ids='specific collection group1','specificcollection group2'--asyncTo export all collection groups from certain namespace, run:
gcloudalphafirestoreexportgs://mybucket/my/path--namespace-ids='specific namespace id'To export from a snapshot at '2023-05-26T10:20:00.00Z', run:
gcloudalphafirestoreexportgs://mybucket/my/path--snapshot-time='2023-05-26T10:20:00.00Z' - POSITIONAL ARGUMENTS
OUTPUT_URI_PREFIX- Location where the export files will be stored. Must be a valid Google CloudStorage bucket with an optional path prefix.
For example:
gcloudalphafirestoreexportgs://mybucket/my/pathWill place the export in the
mybucketbucket in objects prefixedwithmy/path.
- 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:gcloudalphafirestoreexport--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:gcloudalphafirestoreexport--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:gcloudalphafirestoreexport--namespaces-ids='customers','orders' --snapshot-time=SNAPSHOT_TIME- The version of the database to export.
The timestamp must be in the past, rounded to the minute and not older than
earliestVersionTime. If specified, then the exported documents willrepresent a consistent view of the database at the provided time. Otherwise,there are no guarantees about the consistency of the exported documents.For example, to operate on snapshot time
2023-05-26T10:20:00.00Z:gcloudalphafirestoreexport--snapshot-time='2023-05-26T10:20:00.00Z'
- 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:
gcloudfirestoreexportgcloudbetafirestoreexport
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.