Skip to content

Change ejabberd hostname in existing database and config #3670

Answered by badlop
kaizushi asked this question in Questions
Discussion options

You must be logged in to vote

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:

  1. Dump the Mnesia database to a text file using ejabberdctl or WebAdmin with
    https://docs.ejabberd.im/developer/ejabberd-api/admin-api/#dump
  2. Modify that text file (with sed or whatever), making sure to keep the erlang syntax in that file
  3. Clean the mnesia database (better to backup it first, of course)
  4. Load your modified text file using ejabberdctl or WebAdmin with https://docs.ejabberd.i…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@kaizushi
Comment options

@kaizushi
Comment options

@badlop
Comment options

@kaizushi
Comment options

Answer selected by badlop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants