When I restart the dgraph cluster, the data disappears

When I restarted the dgraph cluster, I found that ratel could not get the original data, but it could display the predicate

How should I configure it? The amount of data is huge and I don’t want to re-import.

It is not clear what is your issue. Are you saying that when you “clean prune” the cluster, the Schema stays there (and you wanted it cleaned)? or you wanna clean up it but just keep the schema?

Or maybe something is happening and you lost your data? Again, not clear, very ambiguous what you said. At some point, I get that you have deleted it yourself, but feels like it was an unwanted action? But also I feel that you are saying that some bug happened and you lost your data?

1 Like

Sorry, I re-edited the question

What are the steps that you did?

In general this would never happened. You can kill Dgraph’s instances, you can kill docker, you can restart the containers (using the same volume). That it will be there.

steps:
1、delete zw directory,but p and w file retention
2、start zero cluster
3、start alpha nodes
4、start ratel

Why did you did this? What is the point?

Look, you can’t do that. The whole cluster is one thing. You can’t delete the zero directory and try to use the wall and posting list with another zero instance.

If you wanna drop the data and keep the Schema you can do

curl -X POST localhost:8080/alter -d '{"drop_op": "DATA"}'

Are you trying to do some kind of manual backup? if so, just export and reimport it.

1 Like