[erlang-questions] Copy of mnesia tables from a node to a another node without linkage

Hakan Mattsson hakan@REDACTED
Mon Jul 28 11:33:05 CEST 2008


You may also use the code in the change_node_name example in the
Mnesia User's Guide:

  http://www.erlang.org/doc/apps/mnesia/Mnesia_chap7.html#6.9

/Håkan
---
Håkan Mattsson (uabhams)
Erlang/OTP, Ericsson

On Sun, 27 Jul 2008, Greg Burri wrote:

gb> Date: Sun, 27 Jul 2008 20:10:38 +0200
gb> From: Greg Burri <greg.burri@REDACTED>
gb> To: t ty <tty.erlang@REDACTED>,
gb>     "Erlang-Questions (E-mail)" <erlang-questions@REDACTED>
gb> Subject: Re: [erlang-questions] Copy of mnesia tables from a node to a
gb>     another node without linkage
gb> 
gb> Ok, thanks you ! I will try these two solutions.
gb> 
gb> /Greg
gb> 
gb> On Sun, Jul 27, 2008 at 2:14 AM, t ty <tty.erlang@REDACTED> wrote:
gb> > IIRC any dump of the table would actually encode the node name in it.
gb> > i.e if your other node shares the same name you are ok. Otherwise you
gb> > will have to 'edit' the node's name in.  See the 'educational'
gb> > mnesia:dump_to_textfile/1
gb> >
gb> > Personally I would consider linking the 2 nodes, let mnesia sync then
gb> > remove the links as an easy way out.
gb> >
gb> > t
gb> >
gb> > On Fri, Jul 25, 2008 at 6:00 PM, Greg Burri <greg.burri@REDACTED> wrote:
gb> >> Hi everybody.
gb> >>
gb> >> I want to copy some tables from a node to an another and I want to
gb> >> keep the nodes independent.
gb> >>
gb> >> I have some data in production and I want to upgrade the modules in
gb> >> production but before that I have to make some preproduction tests
gb> >> with the production data (without destroying my production data :o]).
gb> >>
gb> >> This "how-to" : http://www.trapexit.org/Distributing_a_Mnesia_schema
gb> >> works great but obviously theses nodes are linked...
gb> >>
gb> >> I try to use mnesia:backup() in the production node and then
gb> >> mnesia:restore() to the preproduction node but it doesn't work. The
gb> >> saved data are linked to the first node.
gb> >>
gb> >>
gb> >> Does anyone have an idea about this ?
gb> >>
gb> >> TIA
gb> >>
gb> >>
gb> >> /Greg
gb> >> _______________________________________________
gb> >> erlang-questions mailing list
gb> >> erlang-questions@REDACTED
gb> >> http://www.erlang.org/mailman/listinfo/erlang-questions
gb> >>
gb> >
gb> _______________________________________________
gb> erlang-questions mailing list
gb> erlang-questions@REDACTED
gb> http://www.erlang.org/mailman/listinfo/erlang-questions
gb> 


More information about the erlang-questions mailing list