Error
Changing the domain name in the configuration file and in ejabberd's startup command do not work.
Explanation
Because ejabberd uses mnesia as its internal database, and because this system stores the Erlang node name into the backup files, you cannot simply change the domain name in the configuration file and in ejabberd's startup command. if you want to migrate from one host to another you have to 'convert' the backups from the old node name to the new one and then restore these converted backups.
1. Backup database on the old hos
Ejabberdctl backup old. Backup
2. Modify erlang_node in ejabberdctl. cfg to the new node name.
Ejabberdctl start (the node of ejabberd started is the new name, and an empty mnesia database named after the new node name will be created)
3. Convert the backup to new node name
Ejabberdctl mnesia_change_nodename $ oldnode $ newnode $ old. Backup new. Backup
4. Install the backup file as a fallback:
Ejabberdctl install_fallback new. Backup
5. Stop ejabberd
Ejabberdctl stop
6. Start ejabberd
Ejabberdctl start
7. Check that the information of the old database is available