Migration from 2.0.1-2 to 2.1.2 no_exists,sr_group

my intent is to migrate the mnesia-database from HostA to HostB

short facts:
source: HostA 2.0.1-2 @ Ubuntu 8.10
target: HostB 2.1.2-2 @ Ubuntu 10.04.3 LTS

i executed the following steps:

1. Backup
HostA:

# ejabberdctl --node ejabberd@HostA backup /tmp/ejabberd.backup

then i copied the file to HostB

2. Change Hostname:
i used the convert.erl Script for Changing the hostname:

HostB:

# erl
> convert:change_node_name('ejabberd@HostA', 'ejabberd@HostB', "ejabberd.backup", "ejabberd2.backup").
...
{ok,switched}

3. restore backup-file

HostB:

# ejabberdctl restore /<PATH>/ejabberd2.backup
Can't restore backup from "/<PATH>/ejabberd2.backup" at node ejabberd@HostB: Table disco_publish does not exist.

so i tried this:

HostB:

# ejabberdctl debug
> mnesia:restore("/home/combase/ejabberd2.backup", [{skip_tables, [disco_publish]}]).
{aborted,{no_exists,sr_group}}

So this is curious, because the name of the table "sr_group" sounds important. I didn't worry to much, so i tried to skip that table:

> mnesia:restore("/home/combase/ejabberd2.backup", [{skip_tables, [disco_publish,sr_group]}]).
{aborted,{no_exists,sr_user}}

now its getting worse i thought, no table named "sr_user"? Again i didn't worry to much, so i tried to skip that table:

> mnesia:restore("/home/combase/ejabberd2.backup", [{skip_tables, [disco_publish,sr_group,sr_user]}]).
{atomic,[config,bytestream,privacy,local_config,passwd,
         irc_custom,roster,last_activity,offline_msg,route,motd,acl,
         s2s,vcard,caps_features,mod_register_ip,vcard_search,
         motd_users,session,private_storage,pubsub_item,muc_room,
         pubsub_state,iq_response,muc_registered,muc_online_room,
         pubsub_node]}

Success, yeah !!!

Like i expected the result is crappy: when i log me in with my messenger-client i can't see any contacts. In the admin backend ip:5280 i also can't see any users. What went wrong, am i stupid or just a bug?

Oh, the 'roster' table should

Oh, the 'roster' table should have been imported.

If you still have the old node, instead of a binary dump of the mnesia table, you can try to do a text dump. This allows you to edit the text file and import the roster elements into the new server.

hi, tanks for your reply. the

hi, tanks for your reply.

the old node is still available. how can i create a text-file? and how can i import the textfile at the new host?

Several ways. For example

Several ways. For example using ejabberd's WebAdmin -> Nodes -> your node -> Database -> Dump text file.

Syndicate content