Hi,
I am currently trying to migrate 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.
Unofortunately, I have not been successful in completing these tasks, most probably due to lack of erlang knowledge. Please read on and try to help.
First, I dumped the database on the old host (ejabberd 2.0.1) to a dump file:
| ejabberdctl --node ejabberd@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@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@nechayev','ejabberd@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 here:
| 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@nechayev','ejabberd@cucaracha','/tmp/backupfile','/tmp/newfile').
|
However, importing does not work:
| (jabberd)root@cucaracha:/home/mh# sudo -u ejabberd ejabberdctl --node ejabberd@cucaracha restore /home/mh/newfile
| Can't restore backup from "/home/mh/newfile" at node ejabberd@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@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?
Greetings
Marc
Zugschlus wrote: The
The procedure outlined in the README.Debian.gz file to change the host name does not work as advertised:
| (jabberd)root@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@nechayev','ejabberd@cucaracha',"/tmp/backupfile","/tmp/newnewfile").
| ** exception error: undefined function mnesia_convert:change_node_name/4
I'll contact the Debian packager about this problem.
I thus tried to use the older migration procedure that was outlined in a forum entry here:
| wget http://www.ejabberd.im/files/contributions/convert.erl
The tutorial that you refer ( http://www.ejabberd.im/migrate-host ) is only for old 2.0.x. I've put in strong letters that 2.1.x admins better follow the ejabberd Guide.
In your case, right now, follow the tutorial in the ejabberd Guide.
Does anyone have a solution
Does anyone have a solution for the "{aborted,{no_exist,user_caps}}" issue? I am having the same problem, moving from 2.0.1 to 2.1.5 with the same hostname, different machines.
Exactly the same problem on
Exactly the same problem on my machine. Want to migrate from 2.0.1 to 2.1.8 with the same hostname and different machines, but "{aborted,{no_exist,user_caps}}" occurs. Please help me!
Problem solved, but the
Problem solved, but the solution is a little bit dirty...
I created the backup as a binary file with the web frontend, transfered it to the new server with the latest version and imported the file via web interface. This way seemes to work, but why is the console way with ejabberdctl so buggy?!
when restore use
when restore use :
ejabberdctl restore install-fallback file.backup