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

Gordon Guthrie gordon@REDACTED
Fri Jun 8 11:41:00 CEST 2012


Chandru

I have built a code changer/backup traverser based on the same code.

I am trying to get the full cycle to work backing up and restoring on
the same node first before I move to the two-node cycle.

I can't restore a partial backup on the same node with
install_fallback at the moment.

Gordon

On 8 June 2012 10:33, Chandru <chandrashekhar.mullaparthi@REDACTED> wrote:
> 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 <gordon@REDACTED> 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,'hndev@REDACTED'}}}
>>
>> So I am at a bit of a loss.
>>
>> Does install_fallback only work with whole table backups?
>>
>> Gordon
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>
>



More information about the erlang-questions mailing list