-
I want to migrate an ejabberd server from its old hostname to the new hostname. To do this I intend to just use search and replace on the configuration file for my server and also the database. It is the mnesia database where I do not know how to do this. I just want to know how to do a search and replace on the database so everything that matches olddatabasehostname.domain becomes newdatabasehostname.domain, and obviously there I am using a figurative hostname as I do not wish to reveal the actual hostname. Obviously for the configuration file it is as simple as I have tried a variety of Google searches and could not find anything complete. This problem also means my server does not work properly, long story short I have lost it's domain. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
So, you changed one XMPP host in the 'hosts' option of How to change the JID of users (in table passwd) and the contacts (in table roster), and many other mnesia tables: If your database is small (a few hundreds or thousands of users), you can:
If your database is big, that dump and load may be extremely slow and consume all your RAM, and we would need to think another method... Please note one obvious thing: if your users have contacts in other remote servers, they obviously won't know about this change. It is your users duty to contact them and tell that the address have changed. |
Beta Was this translation helpful? Give feedback.
So, you changed one XMPP host in the 'hosts' option of
https://docs.ejabberd.im/admin/configuration/basic/#host-names
How to change the JID of users (in table passwd) and the contacts (in table roster), and many other mnesia tables:
If your database is small (a few hundreds or thousands of users), you can:
https://docs.ejabberd.im/developer/ejabberd-api/admin-api/#dump