Delete Vhost from Database after Migration

Dear all,

after I successfully migrated the database of an Ejabberd 1.x instance to a new host running Ejabberd 2.x, I want to delete one of the vhosts originally contained in that database.

Background: The old server ran Jabber services for two virtual hosts which will now be split up to different boxes. I know I can set the "hosts" directive in the configuration file, but is there some additional way to really get rid of all traces, users, ACLs etc. pp. of an obsolete virtual host?

Thanks and best regards!

Try ejabberdctl delete_old_users_vhost

basquiat wrote:

is there some additional way to really get rid of all traces, users, ACLs etc. pp. of an obsolete virtual host?

If you use some of the released versions ejabberd 2.0.x, you can install mod_ctlextra which implements a command similar to the one I explain here.

As I use ejabberd trunk SVN for development and betatesting, I installed mod_admin_extra in ejabberd trunk SVN. I executed this command that deletes all accounts in a vhost.

$ ejabberdctl delete_old_users_vhost example.org 0
Deleted 1 users: [{"testuser1","example.org"}]

Let's review what it does and doesn't.

About each account in the vhost, it will delete:
* authentication information (if you use internal auth)
* last activity information
* offline messages
* privacy lists
* private xml data
* roster
* vcard

It does not delete:
* roster items of users in other vhosts that have contacts in that vhost
* PubSub nodes
* PubSub subscriptions
* MUC rooms
* MUC affiliations
* MUC nick registration.

It does not delete configuration options ACL and Access. You can delete this in ejabberd.cfg and in the database (using Web Admin).

Syndicate content