I used an admin mutation to export database into the json format,
After export it give me the three json files.
Now I don’t know which file is need to be imported and how to import that file using the mutation script.
I used an admin mutation to export database into the json format,
After export it give me the three json files.
Now I don’t know which file is need to be imported and how to import that file using the mutation script.
Welcome Mahesh.
I am assuming you fired the mutation as described at this link.
The export folder will typically contain the following:
(a) g01.json.gz: This is actual data, which you will use for imports later.
(b) g01.gql_schema.gz: This is the graphql schema. You can extract the contents and initialize a new dgraph instance using this schema.
© g01.schema.gz: This is a Dgraph format. You can choose to ignore it.
In a new Dgraph graphql instance:
curl -X POST localhost:8080/admin/schema --data-binary '@g01.gql_schema'
./dgraph live -f ./export/dgraph.r25.u0922.1137/g01.json.gz
Pass the data file with the -f argument. That should do it.
@anand Thanks for the instant support
Can we any option to import it using the dgraph mutation script?
No, the exported data can only be imported via bulk or live loaders.
@anand Thank you very must for giving me the right direction.