Move users to other virtual host

Hi,

I have ejabberd-2.0.1 instalation with enabled mod_ctlextra. Server is running with default node name
witch is ejabberd@localhost. In this node i have virtual host named host1.mydomain.com and few users.

I would like to know how switch all users from virtual host host1.domain.com to other virtual host
(for example host2.mydomain.com). Is there any solution to do this ?

Quote: Hi, I have

Quote:

I would like to know how switch all users from virtual host host1.domain.com to other virtual host (for example host2.mydomain.com). Is there any solution to do this ?

If you have a small server (let's say around 1000 registered accounts or less) you can try this:

1. Start ejabberd
2. Call this (or use the WebAdmin) to dump the internal Mnesia database to a text file: ejabberdctl dump /tmp/olddatabase.dump
3. Stop ejabberd
4. Copy that file to the name newdatabase.dump and edit it, or use 'sed', to replace all appearances of host1.domain.com with host2.domain.com
5. Edit your ejabberd.cfg, and make the same replacement
6. Find the Mnesia spool directory. It may be somewhere in /var/lib/ejabberd/ with files acl.DCD, ... *.DCD, *.DCL, *.DAT. Backup/copy those files. Then delete them.
7. Start ejabberd
8. Call: ejabberdctl load /tmp/newdatabase.dump
9. Check if you can login to the accounts with new jabber domain, they have the contacts updated...
10. Remember to delete or put in a secure place the files of /tmp.

Syndicate content