User Tools

Site Tools


linux:debian:start

This is an old revision of the document!


Debian

Quick Tips and Tricks

Migrating ejabberd 2.0.x to 2.1.x

WARNING - still work in progress!!!

Debian 6.0 Squeeze, however I think this doesn't depend on your GNU/Linux distribution.

  • Migrating from: ejabberd-2.0.5-x86_84
  • Migrating to: ejabberd-2.1.5-3+squeeze1

Version 1:

  • dump database at old ejabberd
root@foo:~# ejabberdctl backup /tmp/ejabberd.backup
  • move backup, configs etc. to new machine, if needed, using eg. SCP
  • change hostname, if needed or got changed, as described in Migrate FAQ
  • restore database as shown bellow. Skipping tables can be iterative process:
root@foo:~# sh /etc/init.d/ejabberd stop
root@foo:~# ejabberd debug
[...]
(ejabberd@foo)1> mnesia:restore("/tmp/ejabberd2.backup",[{skip_tables,[disco_publish]}]).
{aborted,{no_exists,user_caps}}
(ejabberd@foo)2> mnesia:restore("/tmp/ejabberd2.backup",[{skip_tables,[disco_publish,user_caps]}]). 
{aborted,{no_exists,user_caps_resources}}
(ejabberd@foo)3> mnesia:restore("/tmp/ejabberd2.backup",[{skip_tables,[disco_publish,user_caps,user_caps_resources]}]).
{atomic,[config,privacy,local_config,passwd,irc_custom,
         roster,last_activity,sr_user,offline_msg,route,motd,acl,s2s,
         vcard,caps_features,sr_group,mod_register_ip,vcard_search,
         motd_users,session,private_storage,pubsub_item,muc_room,
         pubsub_state,iq_response,muc_registered,muc_online_room|...]}
(ejabberd@foo)4>q().
  • start ejabberd
root@foo:~# sh /etc/init.d/ejabberd start
  • now, I would like to say “enjoy”, but there was no joy. I couldn't get authenticated no matter what. Perhaps password encryption got changed, I don't know.

Version 2:

  • dump database at old server
root@foo:~# ejabberctl dump /tmp/ejabberd.dump
  • move backup, configs etc. to new machine, if needed, using eg. SCP
  • some changes to ejabberd.dump are required prior restoration FIXME
  • start ejabberd at new server
  • restore database
root@foo:~# ejabberdctl load /tmp/ejabberd.dump
  • hopefully enjoy!
linux/debian/start.1320222746.txt.gz · Last modified: 2011/11/02 03:32 by stybla