Having issues with binary backups

If you didn’t made a lot of changes in between the two backups, what you are seeing is expected.

What are you doing after running dgraph restore? I checked the docs and I am realizing they are not very explicit after what to do next so I will work on improving them. In the meantime I will explain below.

The backup is not restored into a live cluster so if all you do is running dgraph restore it’s not going to have an effect on your existing cluster. The backup files are processed and the result is written to the p1, etc folders inside the directory passed to the -p flag. After that, you would copy those folders into whatever machine/container you are using for your new cluster and run dgraph alpha pointed at this folder. This will start a new alpha that loads the restored backup.

If you have multiple replicas,all of them should get a copy of the folder for their group. Let’s say you made a backup to a 2 group cluster with two replicas then you would copy:

  • p1 to first container of first group (most likely you want to rename it to p)
  • p1 to second container of first group.
  • p2 to first container of second group.
  • p2 to first container of first group.

I apologize for the insufficient docs. These are the kind of things that seem obvious to someone that’s worked with p directories before but are not obvious to other people.