ejabberd - Comments for "Cannot export Mnesia tables on server to files on output directory" https://www.ejabberd.im/node/2856 en Can't get https://www.ejabberd.im/node/2856#comment-53451 <p>Hi<br /> I'm using Version 1.1.4<br /> i try to get the Moudle mod_ctlextra from SVN with this command<br /> svn co <noindex><a href="https://svn.process-one.net/ejabberd-modules/mod_ctlextra/branches/ejabberd-1.1.x" title="https://svn.process-one.net/ejabberd-modules/mod_ctlextra/branches/ejabberd-1.1.x" rel="nofollow" >https://svn.process-one.net/ejabberd-modules/mod_ctlextra/branches/ejabb...</a></noindex></p> <p>But nothing happens</p> <p>Gonen</p> Thu, 24 Jul 2008 08:55:35 +0000 gonens comment 53451 at https://www.ejabberd.im Try new mod_ctlextra in SVN: it shows result https://www.ejabberd.im/node/2856#comment-51970 <p>I've updated mod_ctlextra in ejabberd-modules SVN: it now shows the result of each attempt to export a table.</p> <p>For example, I first tried it and got this:</p> <pre>$ sudo ejabberdctl export2odbc localhost /tmp/2 Trying to export Mnesia table 'last' on server 'localhost' to file '/tmp/2/last.txt' Result: {aborted,{undef,[{ejabberd_odbc,escape,["badlop"]}, {ejd2odbc,'-export_last/2-fun-0-',2}, {ejd2odbc,'-export_common/4-fun-0-',5}, {lists,foldl,3}, {mnesia,do_foldl,8}, {mnesia,foldl,6}, {ejd2odbc,'-export_common/4-fun-1-',4}, {mnesia_tm,apply_fun,3}]}} Trying to export Mnesia table 'offline' on server 'localhost' to file '/tmp/2/offline.txt' Result: {atomic,ok} Trying to export Mnesia table 'passwd' on server 'localhost' to file '/tmp/2/passwd.txt' Result: {aborted,{undef,[{ejabberd_odbc,escape,["badlop"]}, {ejd2odbc,'-export_passwd/2-fun-0-',2}, {ejd2odbc,'-export_common/4-fun-0-',5}, {lists,foldl,3}, {mnesia,do_foldl,8}, {mnesia,foldl,6}, {ejd2odbc,'-export_common/4-fun-1-',4}, {mnesia_tm,apply_fun,3}]}} Trying to export Mnesia table 'private_storage' on server 'localhost' to file '/tmp/2/private_storage.txt' Result: {atomic,ok} Trying to export Mnesia table 'roster' on server 'localhost' to file '/tmp/2/roster.txt' Result: {aborted,{undef,[{ejabberd_odbc,escape,["badlop"]}, {ejd2odbc,'-export_roster/2-fun-0-',2}, {ejd2odbc,'-export_common/4-fun-0-',5}, {lists,foldl,3}, {mnesia,do_foldl,8}, {mnesia,foldl,6}, {ejd2odbc,'-export_common/4-fun-1-',4}, {mnesia_tm,apply_fun,3}]}} Trying to export Mnesia table 'vcard' on server 'localhost' to file '/tmp/2/vcard.txt' Result: {atomic,ok} Trying to export Mnesia table 'vcard_search' on server 'localhost' to file '/tmp/2/vcard_search.txt' Result: {atomic,ok} </pre><p> The files were almost empty, as you described.</p> <p>In my case, the problem was that I compiled ejabberd without odbc.</p> <p>I solved it this way:</p> <pre>$ ./configure --enable-odbc $ make $ sudo make install $ cd /var/lib/ejabberd/ebin/; ls *odbc* ejabberd_auth_odbc.beam ejd2odbc.beam mod_privacy_odbc.beam mod_vcard_odbc.beam ejabberd_odbc.beam mod_last_odbc.beam mod_private_odbc.beam odbc_queries.beam ejabberd_odbc_sup.beam mod_offline_odbc.beam mod_roster_odbc.beam</pre><p> Now I get a good result:</p> <pre>$ sudo ejabberdctl export2odbc localhost /tmp/2 Trying to export Mnesia table 'last' on server 'localhost' to file '/tmp/2/last.txt' Result: {atomic,ok} Trying to export Mnesia table 'offline' on server 'localhost' to file '/tmp/2/offline.txt' Result: {atomic,ok} Trying to export Mnesia table 'passwd' on server 'localhost' to file '/tmp/2/passwd.txt' Result: {atomic,ok} Trying to export Mnesia table 'private_storage' on server 'localhost' to file '/tmp/2/private_storage.txt' Result: {atomic,ok} Trying to export Mnesia table 'roster' on server 'localhost' to file '/tmp/2/roster.txt' Result: {atomic,ok} Trying to export Mnesia table 'vcard' on server 'localhost' to file '/tmp/2/vcard.txt' Result: {atomic,ok} Trying to export Mnesia table 'vcard_search' on server 'localhost' to file '/tmp/2/vcard_search.txt' Result: {atomic,ok} </pre><p>And the generated files have content.</p> <p>Try the new mod_ctlextra, maybe it provides interesting information to find the reason of your problem :)</p> Sun, 09 Mar 2008 19:38:59 +0000 mfoss comment 51970 at https://www.ejabberd.im ODBC is compiled in https://www.ejabberd.im/node/2856#comment-51841 <p>[root@venus ebin]# pwd<br /> /usr/lib/ejabberd-1.1.4/ebin</p> <p>[root@venus ebin]# ls *odbc*<br /> ejabberd_auth_odbc.beam ejabberd_odbc_sup.beam mod_last_odbc.beam mod_roster_odbc.beam odbc_queries.beam<br /> ejabberd_odbc.beam ejd2odbc.beam mod_offline_odbc.beam mod_vcard_odbc.beam</p> Thu, 21 Feb 2008 08:51:46 +0000 Anonymous comment 51841 at https://www.ejabberd.im