Search code examples
google-app-enginegoogle-cloud-storagegoogle-cloud-datastore

Google App Engine Datastore Overall Export File


I use App Engine legacy bundled services and I use the datastore emulator. I wanted to import data from the live database. So according to instructions

curl -X POST localhost:8081/v1/projects/[PROJECT_ID]:import \
-H 'Content-Type: application/json' \
-d '{"input_url":"[ENTITY_EXPORT_FILES]"}'

I ran this (with the correct data in the []) and what I get as a response is

{
    "name": "projects/[project-name]/operations/7a9c8565eb4d403baf3bfa7edb7557f7",
    "metadata": {
        "@type": "type.googleapis.com/google.datastore.admin.v1.ImportEntitiesMetadata",
        "common": {
            "startTime": "2023-05-08T07:30:33.844808Z",
            "endTime": "2023-05-08T07:30:36.638278Z",
            "operationType": "IMPORT_ENTITIES",
            "state": "SUCCESSFUL"
        },
        "entityFilter": {},
        "inputUrl": "/home/username/myexports/2023-05-03T13:17:23_41912/2023-05-03T13:17:23_41912.overall_export_metadata"
    },
    "done": true,
    "response": {
        "@type": "type.googleapis.com/google.protobuf.Empty"
    }
}

It says that it's successful, but nothing is imported. I assume protobuf empty means it didn't find anything?


Solution

  • APPLICATION_ID was incorrect in the environment file. The function is actually very fast in doing the import.