Skip to content

Instantly share code, notes, and snippets.

@jespada
Created April 19, 2012 11:55
Show Gist options
  • Save jespada/2420461 to your computer and use it in GitHub Desktop.
Save jespada/2420461 to your computer and use it in GitHub Desktop.
mnesia copy
%Copy al the tables at once
Node = mynodename, % node to copy these tables
StorageType = fun(T) -> mnesia:table_info(T, storage_type) end,
Tabs = mnesia:system_info(local_tables) -- [schema],
[mnesia:add_table_copy(Tab, Node, StorageType(Tab)) || Tab <- Tabs].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment