gcloud alpha firestore export - export Cloud Firestore documents to Google Cloud Storage
gcloud alpha firestore export OUTPUT_URI_PREFIX [--async] [--collection-ids=[COLLECTION_IDS,...]] [--database=DATABASE; default="(default)"] [--namespace-ids=[NAMESPACE_IDS,...]] [GCLOUD_WIDE_FLAG ...]
(ALPHA) export Cloud Firestore documents to Google Cloud Storage.
To export all collection groups to mybucket in objects prefixed with my/path, run:
$ gcloud alpha firestore export gs://mybucket/my/path
To export a specific set of collections groups asynchronously, run:
$ gcloud alpha firestore export gs://mybucket/my/path \ --collection-ids='specific collection group1','specific collection group2' --async
To export all collection groups from certain namespace, run:
$ gcloud alpha firestore export gs://mybucket/my/path \ --namespace-ids='specific namespace id'
- OUTPUT_URI_PREFIX
Location where the export files will be stored. Must be a valid Google Cloud Storage bucket with an optional path prefix.
For example:
$ gcloud alpha firestore export gs://mybucket/my/path
Will place the export in the mybucket bucket in objects prefixed with my/path.
- --async
Return immediately, without waiting for the operation in progress to complete.
- --collection-ids=[COLLECTION_IDS,...]
List specifying which collections will be included in the operation. When omitted, all collections are included.
For example, to operate on only the customers and orders collections:
$ gcloud alpha firestore export --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:
$ gcloud alpha firestore export --database='foo'
- --namespace-ids=[NAMESPACE_IDS,...]
List specifying which namespaces will be included in the operation. When omitted, all namespaces are included.
This is only supported for Datastore Mode databases.
For example, to operate on only the customers and orders namespaces:
$ gcloud alpha firestore export --namespaces-ids='customers','orders'
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.
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 firestore export
$ gcloud beta firestore export