[ejabberd] Debian Migration from 2.0.1 to 2.1.5 (lenny => squeeze)

Marc Haber mh+ejabberd-list at zugschlus.de
Sun May 1 12:13:02 MSD 2011


I am currently trying to migrate my personal ejabberd from a host
running Debian lenny to a different host running Debian squeeze. So I
have to face the challenges of (a) changing the host name in the
mnesia stuff and (b) doing the actual upgrade.

First, I dumped the database on the old host (ejabberd 2.0.1) to a dump file:
| ejabberdctl --node ejabberd at nechayev backup /tmp/backupfile
and moved the backup file to the new host.

The new host was installed with Debian squeeze, ejabberd 2.1.5
installed and running.

The procedure outlined in the README.Debian.gz file to change the host
name does not work as advertised:
| (jabberd)root at cucaracha:/home/mh# sudo -u ejabberd erl -pa /usr/lib/ejabberd/ebin
| Erlang R14A (erts-5.8) [source] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false]
| Eshell V5.8  (abort with ^G)
| 1> mnesia_convert:change_node_name('ejabberd at nechayev','ejabberd at cucaracha',"/tmp/backupfile","/tmp/newnewfile").
| ** exception error: undefined function mnesia_convert:change_node_name/4
| 2>

I thus tried to use the older migration procedure that was outlined in
a forum entry on ejabberd.im:
| cucaracha:/home/mh# wget http://www.ejabberd.im/files/contributions/convert.erl
| cucaracha:/home/mh# erl
| Erlang (BEAM) emulator version 5.6.3 [source] [smp:2] [async-threads:0] [kernel-poll:false]
| Eshell V5.6.3  (abort with ^G)
| 1> c("convert.erl").
| {ok,convert}
| 2> convert:change_node_name('ejabberd at nechayev','ejabberd at cucaracha','/tmp/backupfile','/tmp/newfile').
| <snip what looked like asuccessful conversion>

However, importing does not work:
| (jabberd)root at cucaracha:/home/mh# sudo -u ejabberd ejabberdctl --node ejabberd at cucaracha restore /home/mh/newfile
| Can't restore backup from "/home/mh/newfile" at node ejabberd at cucaracha: Table disco_publish does not exist.

For this, there is a solution in the forum, since disco_publish is not
used any more:
| (ejabberd at cucaracha)1> mnesia:restore("/home/mh/newfile",[{skip_tables,[disco_publish]}]).
| {aborted,{no_exists,user_caps}}

But for this {aborted,{no_exist,user_caps}} there does not seem to be
a solution in the forums.

How do I complete my migration? Any hints will be appreciated.


Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 3221 2323190

More information about the ejabberd mailing list