[erlang-questions] Mnesia log files - backup&restore and two schemas

Chandru chandrashekhar.mullaparthi@REDACTED
Thu Mar 6 22:27:31 CET 2008


On 06/03/2008, erlang@REDACTED <erlang@REDACTED> wrote:
> Hi,
>
>
>
>  I have two disc_copy nodes in a Mnesia schema (two machines at dbA)
>  and a schema in another network with two disc_copy nodes (two machines
>  at dbB).
>
>  dbA can receive transactions (active) and dbB not (idle).
>
>  What I need to do is to replicate Mnesia data from dbA to dbB at T
>  time intervals.
>

If the table definitions are the same, you should be able to use
mnesia:restore/2 to copy the contents of all/some of the tables. If
you want to make sure that dbB is always an exact copy of dbA, then
you can rename the nodes in the database backup you take from dbA (see
example in mnesia user guide), and then do an mnesia:install_fallback.

cheers
Chandru



More information about the erlang-questions mailing list