Moving ejabberd 2.1.x to a different server

Both server running ejabberd 2.1.x

Sync the config files.

# rsync -avP oldhost:/etc/ejabberd/ /etc/ejabberd/

Maybe also copy ssl-certs and allow ejabberd to access the pem file.

On the old server. ejabberd must be still running.

# ejabberdctl backup /tmp/ejabberd-oldhost.backup

On the new server. ejabberd must be already running.

# ejabberdctl restore /tmp/ejabberd-oldhost.backup