ejabberd - Comments for "Migrate Database to Another Host" https://www.ejabberd.im/migrate-host en This doesnt work at all. https://www.ejabberd.im/migrate-host#comment-66407 <p>This doesnt work at all. Doesnt change users, and doesnt modify the back end references in all places.</p> <p>Garbage.</p> Fri, 20 Nov 2015 16:06:22 +0000 odhrean comment 66407 at https://www.ejabberd.im ejabberd.cfg and ejabberdctl.cfg are different https://www.ejabberd.im/migrate-host#comment-57708 <p>Maybe you are confusing the configuration in ejabberd.cfg of the list of virtual hosts that you want ejabberd to serve<br /> <noindex><a href="http://www.process-one.net/docs/ejabberd/guide_en.html#hostnames" title="http://www.process-one.net/docs/ejabberd/guide_en.html#hostnames" rel="nofollow" >http://www.process-one.net/docs/ejabberd/guide_en.html#hostnames</a></noindex></p> <p>and the configuration of the node name in ejabberdctl.cfg of the host name of the machine where ejabberd is running<br /> <noindex><a href="http://www.process-one.net/docs/ejabberd/guide_en.html#nodename" title="http://www.process-one.net/docs/ejabberd/guide_en.html#nodename" rel="nofollow" >http://www.process-one.net/docs/ejabberd/guide_en.html#nodename</a></noindex><br /> <noindex><a href="http://www.process-one.net/docs/ejabberd/guide_en.html#changeerlangnodename" title="http://www.process-one.net/docs/ejabberd/guide_en.html#changeerlangnodename" rel="nofollow" >http://www.process-one.net/docs/ejabberd/guide_en.html#changeerlangnodename</a></noindex></p> Tue, 09 Aug 2011 21:05:12 +0000 mfoss comment 57708 at https://www.ejabberd.im Guide for latest version https://www.ejabberd.im/migrate-host#comment-57687 <p>Dear folks</p> <p>ejabberd ist great!</p> <p>However, I cannot manage to migrate from the original hostname (derived from localhost) to a new one (mydomain.com). </p> <p>Even if I follow the steps above, I still need to have the original hostname ("localhost") in the hosts attribute in the .cfg config file.</p> <p>As soon, as I modify or add a host in the hosts attribute in .cfg, I receive the error message:</p> <p>Failed RPC connection to the node ejabberd@xxx: nodedown</p> <p>Is there a precise step-by-step description what to do to start a fresh ejabberd installation with a new @domainname?</p> <p>Many thanks in advance!</p> Fri, 05 Aug 2011 12:49:12 +0000 babalunda comment 57687 at https://www.ejabberd.im eaccess means something like https://www.ejabberd.im/migrate-host#comment-54535 <p>eaccess means something like "error accessing a directory or file". Probably ejabberd does not have privilege to read/write the spool files.</p> Mon, 10 Aug 2009 19:04:06 +0000 mfoss comment 54535 at https://www.ejabberd.im Not working... https://www.ejabberd.im/migrate-host#comment-54533 <p>Hi,</p> <p>i've tried to migrate my user database to another server. i used the convert.erl script to convert the hostnames, but when trying to restore the database on the new server i get this error:</p> <p>RPC failed on the node ejabberd@arwen: {'EXIT',<br /> {{case_clause,{aborted,eacces}},<br /> [{ejabberd_ctl,process,1},<br /> {rpc,'-handle_call/3-fun-0-',5}]}}</p> <p>anyone who could give me a hint, what the problem is?</p> <p>thanks.</p> Mon, 10 Aug 2009 14:49:22 +0000 izrail comment 54533 at https://www.ejabberd.im mnesia not available https://www.ejabberd.im/migrate-host#comment-53704 <p>The error message means that it couldn't find the library 'mnesia', included in Erlang/OTP and also in ejabberd installer.</p> <p>By the way, I tried today to copy the spool directory, without backup/convert/import:</p> <ol> <li>Stop ejabberd </li><li>Copy the files in /var/lib/ejabberd/acl.DCD acl.DCD ... to the same directory in the new machine </li><li>In the new machine, start ejabberd </li><li>It started and loaded the database, with all its content! </li></ol> <p>You can try this, if you are lucky it will work, if not you can still try to run convert.</p> Wed, 29 Oct 2008 20:20:07 +0000 mfoss comment 53704 at https://www.ejabberd.im Error in process <0.31.0> https://www.ejabberd.im/migrate-host#comment-53692 <p>I USE the following command as above to backup ejabberd of the old server.<br /> ejabberd_ctl admin@oldhost backup /tmp/ejabberd.backup" </p> <p>Then use convert.erl to convert it, but i get the error as below, anyone could help me, what is wrong about it?</p> <p>---------------<br /> convert.erl as above to<br /> Erlang (BEAM) emulator version 5.5.5 [source] [async-threads:0] [kernel-poll:false]<br /> Eshell v5.5.5 (abort with ^G)<br /> 1&gt; c ("convert.erl").<br /> {ok,convert}<br /> 2&gt; convert:change_node_name("admin@localhost","admin@ubuntutest","ejabberd.bak","ejabberd2.bak").</p> <p>=ERROR REPORT==== 28-Oct-2008::17:20:17===<br /> Error in process &lt;0.31.0&gt; with exit value: {undef,[{mnesia,traverse_backup,["ejabberd.bak","ejabberd2.bak",#Fun,switched]},{erl_eval,do_apply,5},{shell,exprs,6},{shell,eval_loop,3}]}</p> <p>** exited: {undef,[{mnesia,traverse_backup,<br /> ["ejabberd.bak",<br /> "ejabberd2.bak",<br /> #Fun,<br /> switched]},<br /> {erl_eval,do_apply,5},<br /> {shell,exprs,6},<br /> {shell,eval_loop,3}]} **</p> Tue, 28 Oct 2008 09:36:31 +0000 springydd comment 53692 at https://www.ejabberd.im What about restoring to a new server, without a live old server? https://www.ejabberd.im/migrate-host#comment-52134 <p>Well...</p> <p>Case:<br /> =====<br /> Restoring ejabberd mnesia database files to a new machine, because the<br /> old machine is no longer available. Yes, this can happen.</p> <p>Since ejabberd/erlang/mnesia uses the hostname to check if the database<br /> is valid, we have to change the hostname of the new machine a couple<br /> of time. </p> <p>Here's how.</p> <p>Machine names:<br /> ============<br /> Old machine: milliways.verwijs.org<br /> New machine: shrek.verwijs.org</p> <p>Files:<br /> ======<br /> database files: /var/lib/ejabberd<br /> config files: /etc/ejabberd</p> <p>Install Ejabberd:<br /> =================<br /> Install ejabberd;<br /> apt-get install ejabberd</p> <p>Procedure:<br /> ==========</p> <p>01. stop all ejabberd instances on shrek:<br /> shrek# /etc/init.d/ejabberd stop</p> <p>02. Move all files to a backup location<br /> mv /etc/ejabberd /etc/ejabberd_shrek<br /> mv /var/lib/ejabberd /var/lib/ejabberd_shrek</p> <p>03. Get the old files into the new location. I had the backupfiles of the<br /> old server placed on the disk of the new server:<br /> cp -a /data/backups/milliways.verwijs.org/etc/ejabberd /etc/ejabberd<br /> cp -a /data/backups/milliways.verwijs.org/var/lib/ejabberd \<br /> /var/lib/ejabberd</p> <p>04. Important bit: rename shrek to milliways.<br /> echo "milliways" &gt;&gt; /proc/sys/kernel/hostname<br /> echo "milliways" &gt;&gt; /etc/hostname</p> <p>05. Now the old hostname has been set, ejabberd-milliways will start<br /> (yay!)<br /> /etc/init.d/ejabberd start</p> <p>06. Make a backup.<br /> ejabberdctl ejabberd@milliways backup /tmp/backupfile</p> <p>07. Stop ejabberd<br /> /etc/init.d/ejabberd stop</p> <p>08. Put the hostname back:<br /> echo "shrek" &gt;&gt; /proc/sys/kernel/hostname<br /> echo "shrek" &gt;&gt; /etc/hostname</p> <p>09. Put the config-files and database files of shrek back:<br /> rm -rf /etc/ejabberd<br /> mv /etc/ejabberd_shrek /etc/ejabberd<br /> rm -rf /var/lib/ejabberd<br /> mv /var/lib/ejabberd_shrek /var/lib/ejabberd</p> <p>10. Restart ejabberd<br /> /etc/init.d/ejabberd</p> <p>11. Use the restore procedure as described here to convert and import you backupfile:<br /> --&gt; <a href="http://www.ejabberd.im/migrate-host" title="http://www.ejabberd.im/migrate-host">http://www.ejabberd.im/migrate-host</a></p> <p>12. ??????</p> <p>13. Profit!</p> Mon, 07 Apr 2008 21:09:22 +0000 mverwijs comment 52134 at https://www.ejabberd.im Got it working https://www.ejabberd.im/migrate-host#comment-52074 <p>OK, it's working now. For anyone else who arrives here having renamed their server, only afterwards discovering that ejabberd didn't like it, here's what I did. It worked just fine for me, but I'm no ejabberd expert so YMMV, follow these instructions at your own risk...</p> <ol> <li>Temporarily renamed the host back to its old name by editing <code>/etc/hostname</code> and restarting. </li><li>Backed up the database - as above, but nowadays you use a slightly different command:<br /> <pre> ejabberdctl backup /tmp/ejabberd.backup </pre></li><li>Uninstalled ejabberd using <pre>apt-get remove ejabberd</pre></li><li>Switched back to the new name - edit <code>/etc/hostname</code> and restart. </li><li>Reinstalled ejabberd using<br /> <pre>apt-get install ejabberd</pre></li><li>Downloaded and run the convert script, just as above. </li><li>Put the file <code>/tmp/ejabberd2.backup</code> into <code>/var/lib/ejabberd</code> </li><li>Restored the database using the command<br /> <pre>ejabberdctl restore ejabberd2.backup</pre><p>. </p></li></ol> <p>This seemed to fix things - at least, now I can connect using Pidgin and everything looks OK.</p> <p>Cheers,</p> <p>Giles</p> Fri, 28 Mar 2008 20:22:03 +0000 Giles comment 52074 at https://www.ejabberd.im For what it's worth... https://www.ejabberd.im/migrate-host#comment-52063 <p>I've never gotten the convert script to work properly however using a TXT dump of the DB works fine for migrating between hosts. I'm not sure of the pros/cons of it vs a restore from a binary backup but I haven't noticed any problems or oddities.</p> Wed, 26 Mar 2008 09:49:40 +0000 tlaramie comment 52063 at https://www.ejabberd.im How to clear down the database? https://www.ejabberd.im/migrate-host#comment-52055 <p>I'm trying to rename my machine, and have gone through these instructions. Everything seems to work fine, until point 8 where I get this error:</p> <pre> darcachon:/var/lib/ejabberd# ejabberdctl restore ejabberd2.backup RPC failed on the node ejabberd@darcachon: {'EXIT', {badarg, [{ets, lookup, [config,hosts]}, {ejabberd_config, get_global_option, 1}, {ejabberd_admin, keep_modules_tables, 0}, {ejabberd_admin, keep_tables, 0}, {ejabberd_admin,restore,1}, {ejabberd_ctl,process,1}, {rpc, '-handle_call/3-fun-0-', 5}]}} </pre><p> I assume this is because the ejabberd cannot start up with the old database; if so, how do I clear down the DB so that it thinks it's starting on a fresh installation?</p> <p>Cheers,</p> <p>Giles</p> Tue, 25 Mar 2008 13:46:05 +0000 Giles comment 52055 at https://www.ejabberd.im Exporting Mnesia from another host https://www.ejabberd.im/migrate-host#comment-51678 <p>I had to plug the harddrive containing the Mnesia database to another pc to create a backup, I accomplished it by using a chroot and changing the hostname , if anyone has a similar setup they might be interested in the howto I wrote: <noindex><a href="http://geekosphere.org/603/mountat-up-again-aka-how-to-export-ejabberd-userdatabases-from-a-harddrive-connected-to-a-different-host/" title="http://geekosphere.org/603/mountat-up-again-aka-how-to-export-ejabberd-userdatabases-from-a-harddrive-connected-to-a-different-host/" rel="nofollow" >http://geekosphere.org/603/mountat-up-again-aka-how-to-export-ejabberd-u...</a></noindex>.</p> Fri, 25 Jan 2008 00:15:54 +0000 SIYB comment 51678 at https://www.ejabberd.im Migrate Database to Another Host https://www.ejabberd.im/migrate-host#comment-2790 <p>Gracias sander</p> <p>Erlang (BEAM) emulator version 5.5 [source] [async-threads:0] [hipe]</p> <p>Eshell V5.5 (abort with ^G)<br /> 1&gt; c("convert.erl").<br /> {ok,convert}<br /> 2&gt; convert:change_node_name(<noindex><a href="mailto:default@jabber-hispano.org" rel="nofollow" >default@jabber-hispano.org</a></noindex>, ejabberd@mundo-chat, "ejabberd.backup", "ejabberd2.backup").</p> <p>=ERROR REPORT==== 28-Dec-2006::15:03:46 ===<br /> Error in process &lt;0.32.0&gt; with exit value: {badarith,[{erl_eval,eval_op,3},{erl_eval,expr_list,6},{erl_eval,expr,5},{shell,exprs,6},{shell,eval_loop,3}]}</p> <p>** exited: {badarith,[{erl_eval,eval_op,3},<br /> {erl_eval,expr_list,6},<br /> {erl_eval,expr,5},<br /> {shell,exprs,6},<br /> {shell,eval_loop,3}]} **<br /> 3&gt;</p> Thu, 28 Dec 2006 14:11:43 +0000 jabber-hispano comment 2790 at https://www.ejabberd.im What does not https://www.ejabberd.im/migrate-host#comment-2789 <p>What does not work?</p> <p>--<br /> sander</p> Thu, 28 Dec 2006 12:12:33 +0000 sander comment 2789 at https://www.ejabberd.im ejabberd 1.1.2 ? https://www.ejabberd.im/migrate-host#comment-2788 <p>In ejabberd 1.1.2 it does not work to me</p> Thu, 28 Dec 2006 10:57:25 +0000 jabber-hispano comment 2788 at https://www.ejabberd.im