Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to transfer a datastore kind to a new namespace and kindname

This is the way I follow to transfer data from one namespace to another in a new kind
1) export namespace n1 and k1 to google bucket inside a folder
2) The location of metadata file is - /mehul/data/namespace_n1/kind_k1/namespace_n1_kind_k1.export_metadata

3) Use GCP transfer it to transfer it to a new bucket
4) The location of metadata file is - /mehul_new/data/namespace_n1/kind_k1/namespace_n1_kind_k1.export_metadata

But issue is I want to import this in a new namespace n2 and kind k2. How to do this since metadata file has n1 and k1 mentioned inside it. Renaming of folder path in google bucket doesnt help -
 /mehul_new/original_data/namespace_n2/kind_k2/namespace_n2_kind_k2.export_metadata
This is because metadata file inside still has n1 and k1 in it.
What is the correct way to do all this?




I am using datastore import and export functionality to copy kind data to another kind in a new namespace. The issue is once I export to google cloud bucket

0 1 859
1 REPLY 1

Hi @mehulparmariitr ,

Have you already checked Exporting and Importing Entities?

Regards,
Marc