Moving from 2.1.11 to 15.07

Hi,
I'm trying to move from 2.1.11 (Ubuntu 14.04 repository) to 15.07. However all my attempts to import backups or users have failed so far. All I want is to keep the users and their contacts, I'm fine with reconfiguring the rest.

ejabberd@h1653995:~/ejabberd-15.07$ bin/ejabberdctl restore /home/ejabberd/ejabberd3.backup
Can't restore backup from "/home/ejabberd/ejabberd3.backup" at node ejabberd@localhost: Table config does not exist.
ejabberd@h1653995:~/ejabberd-15.07$ bin/ejabberdctl import-piefxis 20150828-213506_mydomain_net.xml
Error: enoent

The only thing I've noticed that might be a problem is that the name of the node in 2.1.11 is ejabberd@h1653995 while the name of the node in 15.07 is ejabberd@localhost. I have no idea on how to change that though.

Can anyone help me out?

Hi, I have the exact same

Hi,

I have the exact same problem when upgrading from ejabberd 2.1.10 to 14.07.

I want to move ejabberd to a new host running debian jessie with ejabberd 14.07. I followed this document for the database migration: https://www.ejabberd.im/migrate-host

However, when I try to restore the database on the new host, I get the following error message:

varda ejabberd # ejabberdctl --node ejabberd@varda restore /tmp/ejabberd2.backup
Can't restore backup from "/tmp/ejabberd2.backup" at node ejabberd@varda: Table config does not exist.

I would appreciate any hints on how to do the database migration.

Thanks, Sven.

Don't restore or import a

Don't restore or import a backup of an old database into a new ejabberd, do that only with similar ejabberd versions.

When moving from old to new ejabberd, let ejabberd use your old database.

This way:
1. Stop the old ejabberd 2.1.11
2. Copy the Mnesia spool dir (read in the Guide to know what this is) from old ejabberd to new ejabberd directory.
3. Start the new ejabberd (with the old database)
4. The new ejabberd will detect that the database has the old format, and will update it:

...
10:28:48.530 [info] Application p1_iconv started on node ejabberd@localhost
10:28:48.563 [info] Converting 'last_activity' table from strings to binaries.
10:28:49.163 [info] Converting 'muc_room' table from strings to binaries.
10:28:49.595 [info] Converting 'privacy' table from strings to binaries.
10:28:50.123 [error] transaction return internal error: {aborted,{bad_type,{pubsub_state,{{<<>>,<<"pubsub.localhost">>,<<>>},3},[],owner,[]}}}
10:28:50.125 [error] transaction return internal error: {aborted,{bad_type,{pubsub_state,{{<<>>,<<"pubsub.localhost">>,<<>>},3},[],owner,[]}}}
10:28:50.127 [info] Binarization of pubsub nodes table...
10:28:50.127 [info] Pubsub nodes table has been binarized: ok
10:28:50.127 [info] Upgrading pubsub states table...
10:28:50.506 [info] Pubsub states table upgraded: ok
10:28:50.509 [info] Converting 'roster' table from strings to binaries.
10:28:51.095 [info] Reusing listening port for 4560
10:28:51.095 [info] Reusing listening port for 5222
10:28:51.096 [info] Reusing listening port for 5269
10:28:51.096 [info] Reusing listening port for 5280
10:28:51.097 [info] Reusing listening port for 5281
10:28:51.097 [info] ejabberd 15.07.68 is started in the node ejabberd@localhost
10:28:51.097 [info] Application ejabberd started on node ejabberd@localhost

5. Now login some user to check all is correct, or login to WebAdmin.

Syndicate content