Login to old server and stop openfire.(/etc/init.d/openfire stop)
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/
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
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
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
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)
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