Migration from cluster to non cluster and version to version

I've a complicated to migration scenario:

The old server setup is a cluster with Mnesia.
The cluster node names are"host1.example.org" and "host2.example.org"
The configured host name is "jabber.example.org"
The users are registered as "user@jabber.example.org", authenticated against LDAP
There is an appreciable amount of user data (rosters, etc.).

The new server setup is a single host with Mnesia
The configured node name is "example.org"
The desired user pattern is "user@example.org", still authenticated against ldap
We desire to migrate the existing user roster data.

I took a look at the convert.erl program, but this doesn't deal with the multiple node to single node situation. It's also unclear that it deals with the user data migration.

Any pointers would be greatly appreciated.

Thanks,

Denny

Progress

Looks like the convert.erl will end up dropping nodes that are not chosen for rename, so it looks like this part is easily solved.

So, the big problem that I have left is how to deal with the user data migration issue resulting from the renaming of the virtual host from "jabber.example.org" to "example.org"

So far, I haven't had much success editing the Mnesia database using a hex editor :-)

Has anyone else faced this issue? Any suggestions?

Thanks,

Denny

You can try to dump to text file

dennypage wrote:

So, the big problem that I have left is how to deal with the user data migration issue resulting from the renaming of the virtual host from "jabber.example.org" to "example.org"

So far, I haven't had much success editing the Mnesia database using a hex editor :-)

Has anyone else faced this issue? Any suggestions?

If you have a reasonable small database, instead of 'backup' the database to a binary file, you can 'dump' the database to a text file. After you edit the file, you can 'load' the text file in another ejabberd installation.

Remember that, if your users have contacts in other remote Jabber servers, such contacts will not be aware of the domain change.

Format for the dump file?

I did try a few approaches at this, however I wasn't ever able to get the server to load the resulting file.

Part of the problem is that I was guessing about the format of the roster entries in the dump file. Is this documented anywhere?

Thanks,

Denny

Please excuse the stupid question about the schema

I'm editing the file by hand and it is working.

Thanks all.

Syndicate content