[erlang-questions] mnesia sample of backup traversal - with change of node name

Sanjaya Vitharana <>
Wed Apr 25 09:43:28 CEST 2007


Hi,

I wan't to make it work the sample "bup.erl" (code example doing backup traversal - with change of node name) which is located in example directory of mnesia.

But failed with 2 nodes. Where am I doing wrong ? Please guide me.

NOTE:
    Also note that the ping from node 1 to node 2 fails & node 2 to node 1 success

Thanks in advance.

Sanjaya Vitharana

-----------------------------------------------------------------------
Node 1

[ examples]# pwd
/usr/local/lib/erlang/lib/mnesia-4.3.3/examples
[ examples]# erl -sname db_nodes  -mnesia dir '"/usr/local/lib/erlang/lib/mnesia-4.3.3/examples/db_nodes"' -setcookie w
Erlang (BEAM) emulator version 5.5.2 [source] [async-threads:0] [hipe]

Eshell V5.5.2  (abort with ^G)
()1> nodes().
[]
()2> net_adm:ping().
pang
()3> nodes().
[]
()4> c(bup).
./bup.erl:139: Warning: variable 'NewStartRes' is unused
./bup.erl:224: Warning: variable 'Oid' is unused
./bup.erl:232: Warning: variable 'CounterTab' is unused
{ok,bup}
()5> bup:test().

=INFO REPORT==== 22-Apr-2007::23:01:20 ===
    application: mnesia
    exited: stopped
    type: temporary
{schema,schema,
        [{name,schema},
         {type,set},
         {ram_copies,[]},
         {disc_copies,[]},
         {disc_only_copies,[]},
         {load_order,0},
         {access_mode,read_write},
         {index,[]},
         {snmp,[]},
         {local_content,false},
         {record_name,schema},
         {attributes,[table,cstruct]},
         {user_properties,[]},
         {frag_properties,[]},
         {cookie,{{1177,261280,346825}}},
         {version,{{2,0},[]}}]}.
{schema,bup_rec,
        [{name,bup_rec},
         {type,set},
         {ram_copies,[]},
         {disc_copies,[]},
         {disc_only_copies,[]},
         {load_order,0},
         {access_mode,read_write},
         {index,[]},
         {snmp,[]},
         {local_content,false},
         {record_name,bup_rec},
         {attributes,[key,val]},
         {user_properties,[]},
         {frag_properties,[]},
         {cookie,{{1177,261280,330333}}},
         {version,{{2,0},[]}}]}.
{bup_rec,9,81}.
{bup_rec,6,36}.
{bup_rec,7,49}.
{bup_rec,5,25}.
{bup_rec,4,16}.
{bup_rec,8,64}.
{bup_rec,3,9}.
{bup_rec,2,4}.
{bup_rec,10,100}.
{bup_rec,1,1}.
{error,{{badmatch,{error,{"Cannot install fallback",enoent}}},
        [{bup,test2,3},
         {bup,test,1},
         {erl_eval,do_apply,5},
         {shell,exprs,6},
         {shell,eval_loop,3}]}}
()6> 
-----------------------------------------------------------------------
Node 2

[ examples]# pwd
/usr/local/lib/erlang/lib/mnesia-4.2.3/examples
[ examples]# erl -sname db_nodes  -mnesia dir '"/usr/local/lib/erlang/lib/mnesia-4.2.3/examples/db_nodes"' -setcookie w
Erlang (BEAM) emulator version 5.4.12 [source] [hipe] [threads:0]

Eshell V5.4.12  (abort with ^G)
()1> nodes().
[]
()2> net_adm:ping().
pong
()3> nodes().
[]
()4> 
-----------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070425/31c38ce7/attachment.html>


More information about the erlang-questions mailing list