There is a somewhat new service to export/import datastore entities:
https://cloud.google.com/datastore/docs/export-import-entities#starting_managed_export_and_import_operations (which previously could be done from the "datastore admin"). The documentation says:
However this doesn't seem to be entirely accurate. They seem to be doing some funky things with the CRC for one and marking the end of the file isn't in accordance with the documentation. Fortunately the Cloud SDK has code which produces such dumps (see RecordsWriter in google/appengine/ext/mapreduce/records.py) and furthermore has a reader (!). So here is a small python snippet to read the models from such a dump:
import sys
sys.path.append('/usr/lib/google-cloud-sdk/platform/google_appengine')
from google.appengine.datastore import entity_pb
from google.appengine.ext.mapreduce import records
from google.appengine.ext import ndb
class TestModel(ndb.Model): # we need the definition of the model we want to read
foobar = ndb.StringProperty(indexed=False)
with open(sys.argv[1], 'rb') as f:
for r in records.RecordsReader(f, strict=True):
entity = TestModel._from_pb(entity_pb.EntityProto(r))
print(entity)