1

I have a rebar3 app which starts an Mnesia DB.
I want to backup this DB on another node, so I've copied the code to another computer and tried to sync the nodes according to this and this.
Unfortunately I'm getting:
Mnesia('node1@pc1'): ** ERROR ** mnesia_event got {inconsistent_database, running_partitioned_network, 'node2@pc2'}

I'm setting the cookie in-code, and the DBs are identical, so this doesn't make sense to me. The cookie in the error dumps is a bit different tho.
Help will be appreciated.

halfway258
  • 115
  • 13

1 Answers1

0

I fixed my problem, apparently I didn't follow the right startup protocol:
According to the Mnesia doc all nodes start an empty schema, then the master nodes creates the schema with the relevant nodes, and then there's a sync/connect message between the nodes.
This means that each node at startup has to check whether it is the master node and create the schema, or just init mnesia.

halfway258
  • 115
  • 13