Migrate Openfire to new server

New Server

  1. Download latest rpm version of openfire to new server ( http://www.igniterealtime.org/downloads/index.jsp)
  2. rpm -ivh openfire-.rpm
  3. mv /opt/openfire/conf/openfire.xml /opt/openfire/conf/openfire.xml.bak

Old Server

  1. Login to old server and stop openfire.(/etc/init.d/openfire stop)

  2. Move conf and plugins to new server without changing the name
    scp /opt/openfire/conf/openfire.xml newserverip:/opt/openfire/conf/
    scp -r /opt/openfire/plugins/* newserverip:/opt/openfire/plugins/

  3. Move Database.
    scp -r /opt/openfire/embedded-db newserverip:/opt/openfire
    If you are using mysql or any other database move to new server without changing the name.

New Server

5.Add following iptable rules to open ports
-A INPUT -p tcp -i eth0 --dport 5222 -j ACCEPT
-A INPUT -p udp -i eth0 --dport 5222 -j ACCEPT
-A INPUT -p tcp -i eth0 --dport 7777 -j ACCEPT
-A INPUT -p udp -i eth0 --dport 7777 -j ACCEPT
-A INPUT -p tcp -i eth0 --dport 9090 -j ACCEPT
-A INPUT -p udp -i eth0 --dport 9090 -j ACCEPT
-A INPUT -p tcp -i eth0 --dport 9091 -j ACCEPT
-A INPUT -p udp -i eth0 --dport 9091 -j ACCEPT
6. Restart openfire in new server
/etc/init.d/openfire stop
/etc/init.d/openfire start

1 Like

Thanks I miss it

Moving from Centos 6 to CentOS 7.4 I followed the instructions above but cannot connect to MySQL tried also tried setting username and password but I guess the md5 hash is different still cannot connect openfire with MySQL so not working at this time anything else I can try Old server still working at this time. on 3.8.3 but would like to get 4.2.3 running

Edit conf/openfire.xml and change <setup>true<setup> to <setup>false<setup>

On restart, you’ll be prompted for the DB details again, this will reset all the properties allowing you to connect.

Greg

Hi Greg,

That helped a bit, to narrow down the problem, but the key part of the problem appears to be that the database tables are different and that is what caused the problems. Trying to figure out how to migrate user data from the old database schema to the new one. and the salt value does not exist in the old database. so password is difference

Regards

Phil Sbrana-Browning
Systems Engineer

Visit us at the ACHEMA Exhibition we are located Hall 4.2 Stand F37https://www.achema.de/en/visitor-service/visit-plan/achema-a-to-z.html

[/uploads/default/original/2X/8/82d558263117ec4d4fdaebe8dabf77b078559ec0.png]

Hmm, normally the DB schema is automatically updated, but perhaps 3.8.3 to 4.2.3 is too large a jump. Have you tried restoring your DB to the 3.8.3 version, and upgrading between major versions (3.8.3 -> 3.9.2 -> 3.10.3 -> 4.0.4 -> 4.1.6 -> 4.2.3)

1 Like

And to do that one can find older versions here https://github.com/igniterealtime/Openfire/releases

Hi Greg,

Thanks your feedback, We have looked at the issue again and in the light of European legislation GDPR, it is probably the best plan to create a completely new version of jabber 4.2.3 and archive off the older Jabber server to ensure compliance with regulations. Plus it will make things a little easier. going through 5 steps of upgrade would be a bit of a pain.

So our plan will be to create completely new Jabber server, use clean Database, migrate as much contacts and rosters etc as is possible

Regards

Phil Sbrana-Browning
Systems Engineer

Visit us at the ACHEMA Exhibition we are located Hall 4.2 Stand F37https://www.achema.de/en/visitor-service/visit-plan/achema-a-to-z.html

[/uploads/default/original/2X/8/82d558263117ec4d4fdaebe8dabf77b078559ec0.png]