ejabberd - Comments for "2.x release: Going from internal to MySQL?" https://www.ejabberd.im/node/3437 en Plan with care https://www.ejabberd.im/node/3437#comment-54110 <div class="quote-msg"> <div class="quote-author"><em>creiss</em> wrote:</div> <p>Using the internal db currently, and want to migrate to SQL (on the same host) now, </p></div> <p>Notice: once you migrate from Mnesia to external, there isn't any way to go back to Mnesia.</p> <p>The only good reasons I know for migrating from Mnesia storage to other external storage are: integration with previosly existing data; very tight integration with other systems that need continuous access to roster; very big server for which Mnesia is not recommended.</p> <div class="quote-msg"> <div class="quote-author"><em>creiss</em> wrote:</div> <p>ideally by socket, not tcp. </p></div> <p>I don't know what method is used by the Erlang's MySQL library used by ejabberd.</p> <div class="quote-msg"> <div class="quote-author"><em>creiss</em> wrote:</div> <p>A "ejabberdctl <noindex><a href="mailto:ejabberd@alpha-labs.net" rel="nofollow" >ejabberd@alpha-labs.net</a></noindex> backup ejabberd.db" gives me this: </p></div> <p>This backups your Mnesia database, this is not intended for migration to SQL.</p> <div class="quote-msg"> <div class="quote-author"><em>creiss</em> wrote:</div> <p>How would I go about porting data? I was thinking along the lines of dumping, changing to mysql, re-importing. </p></div> <p>The migration from Mnesia to SQL involves:</p> <ol> <li>Export some tables from Mnesia to SQL files: <ul> <li>using manually ejd2odbc </li><li>or using the command export2odbc included in mod_ctlextra. This module can be downloaded and compiled from ejabberd-modules SVN </li></ul> </li><li>If not yet done, install in ejabberd the files mysql*.beam. </li><li>Create the MySQL database and tables </li><li>Import the SQL files in the database </li><li>Configure ejabberd to use some ODBC modules instead of default ones </li></ol> Wed, 25 Mar 2009 11:37:51 +0000 mfoss comment 54110 at https://www.ejabberd.im ok, I can export the database https://www.ejabberd.im/node/3437#comment-54097 <p>ok,</p> <p>I can export the database with dump/backup now, forgot "--node". And I was able to run a clean (no data) instance of ejabberd running MySQL. So it's working -- except the data.</p> <p>I really desperatly need a pointer on how to export from amnesia and how to import into SQL..</p> <p>Help!</p> <p>-Chris</p> Sun, 22 Mar 2009 18:46:01 +0000 creiss comment 54097 at https://www.ejabberd.im