[erlang-questions] Mnesia Backup/Fallback Problems With Schema

Chandru <>
Fri Jun 8 11:33:10 CEST 2012


Hi Gordon,

The node name is in the schema. If you want to install_fallback on another
node, you have to change the node name in the backup file. Attached is a
module which might be of use to you. We use it quite a lot in our setup.

The code here is based on an example in the Mnesia user guide.

cheers
Chandru

On 8 June 2012 09:47, Gordon Guthrie <> wrote:

> Folks
>
> Having some problems with mnesia backups.
>
> I have servers running with lots of tables for lots of site, so we use
> a naming convention for the tables to separate the data:
> site_1_table_1, ..., site_1_table_n
> ...
> site_m_table_1, ..., site_m_table_n
>
> I want to be able to backup individual sites and restore them - maybe
> on the original machine, maybe on another one.
>
> So I setup a checkpoint across a set of tables (site_1_table_1 to
> site_1_table_n) and back it up.
>
> The tables can be quite big so mnesia:restore/2 isn't practical and I
> have to use mnesia:install_fallback - this is where I hit problems.
>
> I get the error message:
>
>     {error,{"Cannot install fallback",
>              {"Cannot lookup",schema}}}
>
> Ok, I figured it needs the schema to be backed up as well, so I then
> build a checkpoint with the schema and the set of tables I want to
> backup. But when I run that I get a different error:
>
>     {error,{"Cannot install fallback",
>              {already_exists,''}}}
>
> So I am at a bit of a loss.
>
> Does install_fallback only work with whole table backups?
>
> Gordon
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120608/9ae8dd7d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cnm.erl
Type: application/octet-stream
Size: 3479 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120608/9ae8dd7d/attachment.obj>


More information about the erlang-questions mailing list