|
User
Joined: 03 Mar 2010
Posts: 14
|
Have a RAM only table
on nodeX
table_info(pos,all)
----------------
Code:
result=[{access_mode,read_write},
{active_replicas,['nodeX@host1']},
{arity,54},
{attributes,
[... fields .....]},
{checkpoints,[]},
{commit_work,[]},
{cookie,
{{1275,612421,604288},'nodeX@host1'}},
{cstruct,
{cstruct,pos,set,
['nodeX@host1'],
[],[],0,read_write,[],[],false,pos,
[... fields ....],
[],[],
{{1275,612421,604288},
'nodeX@host1'},
{{2,0},[]}}},
{disc_copies,[]},
{disc_only_copies,[]},
{frag_properties,[]},
{index,[]},
{load_by_force,false},
{load_node,'nodeX@host1'},
{load_order,0},
{load_reason,{dumper,create_table}},
{local_content,false},
{master_nodes,[]},
{memory,6524080},
{ram_copies,['nodeX@host1']},
{record_name,pos},
{record_validation,{pos,54,set}},
{type,set},
{size,15266},
{snmp,[]},
{storage_type,ram_copies},
{subscribers,[]},
{user_properties,[]},
{version,{{2,0},[]}},
{where_to_commit,
[{'nodeX@host1',ram_copies}]},
{where_to_read,'nodeX@host1'},
{where_to_write,['nodeX@host1']},
{wild_pattern,
{pos,'_','_','_','_','_','_','_','_','_','_','_','_','_','_','_',
'_','_','_','_','_','_','_','_','_','_','_','_','_','_','_',
'_','_','_','_','_','_','_','_','_','_','_','_','_','_','_',
'_','_','_','_','_','_','_','_'}}]
I want to move the content of that table to another node that has the same table with 0 rows.
I tried with 'backup restore' but -- this is RAM only so backup did not capture it.
When I try the move_table_copy command I get
Code:
mnesia:move_table_copy(pos,'nodeX@host1',node()).
mnesia:move_table_copy(pos,'nodeX@host1',node()).
{aborted,{already_exists,pos,
'nodeY@host2}}
on the other hand if I first drop the table,
and then try to do the same command, I get
'pos' does not exist.
So how does this work? How can I move ram tables around ?
Also how can I take backups of those tables and 'recreate them' completely in another node
I typically first convert a backup from one node to another and then do restore, but since ram copies do not get backed up who do they get moved to another node?
thank you in advance |
|
|