gcloud datastore export

NAME
gcloud datastore export - export Cloud Datastore entities to Google Cloud Storage
SYNOPSIS
gcloud datastore exportOUTPUT_URL_PREFIX[--async][--kinds=[KIND,…]][--namespaces=[NAMESPACE,…]][--operation-labels=[OPERATION_LABEL,…]][GCLOUD_WIDE_FLAG]
DESCRIPTION
Export a copy of all or a subset of entities from Google Cloud Datastore toanother storage system, such as Google Cloud Storage. Recent updates to entitiesmay not be reflected in the export. The export occurs in the background and itsprogress can be monitored and managed via the operation commands. The output ofan export may only be used once the operation has completed. If an exportoperation is cancelled before completion then it may leave partial data behindin Google Cloud Storage.
EXAMPLES
To export all kinds in theexampleNs namespace in theexampleProject project to theexampleBucket, run:
gclouddatastoreexportgs://exampleBucket--namespaces='exampleNs'--project='exampleProject'

To export theexampleKind andotherKind kinds in theexampleNs namespace in theexampleProject project totheexampleBucket, run:

gclouddatastoreexportgs://exampleBucket--kinds='exampleKind','otherKind'--namespaces='exampleNs'--project='exampleProject'

To export all namespaces and kinds in the currently set project to theexampleBucket without waiting for the operation to complete, run:

gclouddatastoreexportgs://exampleBucket--async

To export theexampleKind in all namespaces in the currently setproject to theexampleBucket, and output the result in JSON, run:

gclouddatastoreexportgs://exampleBucket--kinds='exampleKind'--format=json
POSITIONAL ARGUMENTS
OUTPUT_URL_PREFIX
Location for the export metadata and data files. Must be a valid Google CloudStorage bucket with an optional path prefix. For example:
gclouddatastoreexportgs://mybucket/my/path

Will place the export in themybucket bucket in objects prefixedwithmy/path.

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:
gclouddatastoreexport--kinds='Customer','Order'
--namespaces=[NAMESPACE,…]
A list specifying what namespaces will be included in the operation. Whenomitted, all namespaces are included in the operation, including the defaultnamespace. To specify thatonly the default namespace should beoperated on, use the special symbol '(default)'. For example, to operate onentities from both the 'customers' and default namespaces:
gclouddatastoreexport--namespaces='(default)','customers'
--operation-labels=[OPERATION_LABEL,…]
A string:string map of custom labels to associate with this operation. Forexample:
gclouddatastoreexport--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
These variants are also available:
gcloudalphadatastoreexport
gcloudbetadatastoreexport

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-05-07 UTC.