Restoring single-host Mnesia backup on another host? (Best practices?)

Ulf Wiger (AL/EAB) ulf.wiger@REDACTED
Thu Feb 24 10:34:39 CET 2005


Yes, look at mnesia:traverse_backup()

See http://www.erlang.se/doc/doc-5.4.3/lib/mnesia-4.2/doc/html/Mnesia_chap7.html#6.9
where you also have an code example doing backup traversal.

/Uffe

> -----Original Message-----
> From: owner-erlang-questions@REDACTED
> [mailto:owner-erlang-questions@REDACTED]On Behalf Of Adam Aquilon
> Sent: den 24 februari 2005 10:08
> To: erlang-questions@REDACTED
> Subject: Restoring single-host Mnesia backup on another host? (Best
> practices?)
> 
> 
> Hi all!
> 
> I'm wondering if it is possible to do a mnesia:backup/1 on one
> host (schema with multiple nodes), transfer that file to another
> host (different hostname,IP) and restore it there?
> 
> 
> Background:
> 
> We have a simple system running as 3-4 nodes on a single linux host.
> Some tables are shared among the nodes, others are local.
> We do periodic backups of the data in all tables by calling
> mnesia:backup/1 from a cron job.
> 
> We'd like to have another host as a standby machine in case the first
> one has some kind of problem. (Note: The erlang software must not
> be running on the standby machine.)
> 
> It would be nice to be able to propagate the backup files to 
> the standby
> machine on a regular basis, and then, if the live machine 
> fails, be able
> to just startup the system on the standby machine, load the backup and
> continue running!
> 
> Does Mnesia have the ability to replace, ignore or bypass hostnames in
> its housekeeping information?
> 
> Or is there an easy way of doing this kind of thing in a 
> restore filter
> of some kind?
> 
> Maybe some other solution to the general problem?
> (The preferred solution would be to use Mnesia in distributed mode
> between the two hosts, but that won't work in our case.)
> 
> I realize that replacing host-specific stuff in the table *contents*
> would be very tricky, but we'll handle that specific problem 
> ourselves.
> 
> 
> /Adam Aquilon
> 
> 
> 



More information about the erlang-questions mailing list