Domain name upgrade

Hi,

I wish to change the domain name ponting to my ejabberd server. Updating {hosts, ["jabber.example.org"]} was the easy part, but how do I allow users with the old domain name to migrate without having them to create a new account ? Can I just replace the old domain name in the Mnesia DB ?

Note that the old domain name will not be renewed.

> Can I just replace the old

> Can I just replace the old domain name in the Mnesia DB ?

The erlang/mnesia node name has nothing to do with the XMPP domain name.

In order to change the XMPP domain name, you have to change the elements in the Mnesia database. One way is to dump the mnesia database to a text file. Then edit the text file to change the names. Then delete the old tables contents, and finally load the modified text file.

That's what I meant, yes.

That's what I meant, yes. And it worked like a charm, thanks, even while upgrading from 2.1.10 to 14.07. :)

For search's sake, ejabberdctl restore NEWDB will lead to the following error :

Problem 'error {case_clause,{aborted,{file_error,"ejab.new",eacces}}}' occurred executing the command.
Stacktrace: [{ejabberd_admin,restore_mnesia,1,
                             [{file,"src/ejabberd_admin.erl"},{line,441}]},
             {ejabberd_ctl,call_command,3,
                           [{file,"src/ejabberd_ctl.erl"},{line,293}]},
             {ejabberd_ctl,try_call_command,3,
                           [{file,"src/ejabberd_ctl.erl"},{line,269}]},
             {ejabberd_ctl,process2,3,
                           [{file,"src/ejabberd_ctl.erl"},{line,218}]},
             {ejabberd_ctl,process,1,
                           [{file,"src/ejabberd_ctl.erl"},{line,203}]},
             {rpc,'-handle_call_call/6-fun-0-',5,
                  [{file,"rpc.erl"},{line,205}]}]

This is because the right syntax for loading text-dumped DB is ejabberdctl load NEWDB, not restore.

Syndicate content