Dumping a mnesia database in a standard format
Hakan Mattsson
hakan@REDACTED
Thu Aug 4 09:59:22 CEST 2005
On Wed, 3 Aug 2005, Sebastian Bello wrote:
SB> more mnesia questions. Does anybody know of a tool to dump a
SB> mnesia database to a file, but in a format suitable for loading it
SB> into a non-mnesia (relational) database? I know it shouldn't be hard
SB> to write such a tool, just wanna know is one already exists.
Mnesia has no such support off the shelf.
But you may write your own Mnesia backup
callback module to handle any backup media
or file format.
For example you may use a simple text format
with one record per row and the attributes
separated with some unique character (e.g. tab).
But you should probably limit your records to
only contain data that are easily transformed
to types that a RDBMS may represent.
See
http://erlang.se/doc/doc-5.4.8/lib/mnesia-4.2.2/doc/html/Mnesia_App_B.html#9
for details about the backup callback API.
/Håkan
More information about the erlang-questions
mailing list