Migrate Openfire to new server

Version 1

    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

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

    6. 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