[erlang-questions] Reusing mnesia schema on different nodes

ARUN P arunp@REDACTED
Sat Oct 15 13:09:04 CEST 2016


Hi,

     As far as i know to reuse mnesia schema on different nodes, when 
the name of the node changes, we need to repair the Mnesia schema, as it 
contains the names of the nodes where the tables belong.

So before starting Mnesia i will open the schema.DAT file, a dets file 
which contains {schema, Tab, Opts} entries. Among the options change the 
old node name to the new node name, and save the new schema under its 
original file name. Then if we start Mnesia and all our data will be there.

but i have a doubt, since the dets operations are not transactional in 
the middle editing schema.DAT file, if my application gets restart, will 
it corrupt the schema.DAT file and if happens so how can i safe guard 
the data.? Can anybody suggest me how to tackle this problem. ?

Thanks in advance
Arun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20161015/35b43965/attachment.htm>


More information about the erlang-questions mailing list