Backup users and groups - openfire

Hi,

Please kindly help me in upgrading openfire server from Version 3.7.1 to the latest version. i will be installing the server in windows 2008 64 bit and the same users and groups need to be replicated in the new server. i have installed on the embaded database,

kamal.bernard@outlook.com

Thsnks

Kamal.

You can just stop Openfire and backup the whole C:\Program Files\Openfire folder. Your database is located in C:\Program Files\Openfire\embedded-db.

1 Like

Thank you for your email.

after doing this will all my users and groups will migrate to the new server? or i need to copy the entire folder and past it in the new server?

ples let me know

Thanks

Kamal

Backup is needed only if something goes wrong and you need to roll back to the older setup. Ideally you should just install new version on top and it should update your database structure and everything should work. I haven’t done upgrades of versions with such big gap (3.7.1 - 3.9.1) and there is a possibility something could brake, so that’s why it’s good to have a backup. Also, the problems you can encounter could be not as a result of a bad upgrade, but maybe something changed in the code so radically, so things work differently in the newest versions and something will stop working as you expect. You should keep that in mind and do a test of all the main features you use after the upgrade, even if at first glance everything seems to work as before.

1 Like

I just tried an upgrade from 3.6.4 to 3.9.1 and it did break. Java Heap error. I tried increasing the amount of java memory without success. It was also using a lot of CPU (trying to upgrade the database?) I even tried copying the embedded-db onto a newliy installed working 3.9.1 with the same results. ie incompatibly database. Fortunately I still had the installer for 3.6.4 and installed back over the upgrade version and it all came back. I still dont have a way to export the users to the new version as the user-export-import plugin wont run on the old version.

1 Like

In this case you probably need to run sql upgrade scripts manually one by one and see on which it fails. Can’t say how this can be done exactly, especially with the embedded one. Haven’t done this myself, only heard others doing or suggesting this.

If i’m not wrong the current version of your database structure is in the openfire/embedded-db/openfire.script on the line

INSERT INTO OFVERSION VALUES(‘openfire’,21)

In the openfire/resources/database/upgrade there is folders for 21 upgrades. You should find out what is your current database version (say 15) and then somehow run 16-th script on your database, then 17-th and so on. In the case of the embedded one it would be openfire_hsqldb.sql script. Installer should do these upgrades automatically, but it probably fails when there are too many changes.

I only have Import-Export plugin for 3.8.2 version. maybe i have even older somewhere, will check later. Probably it can still be downloaded like any other older Openfire version (substituting the version number in the download link), but i will have to find out this.
userimportexport 2.3.1.jar (287167 Bytes)

1 Like

Thanks wr00t

One of the most helpful answers I’ve ever had. Sorry it is not my thread, so cant give you points

I’ll give it a try

1 Like

Hi Wr00t

Just want to know if we take backing using the import export option in Open fire server will all my Groups also be backed up?

because we are going to format the current open fire server and install it in a VM so I need all my users and groups to be visible in the new server.

Thanks

kamal.bernard@outlook.com

No, it won’t save your groups i think. But i haven’t used this plugin for 10 years probably. You can try exporting and check for yourself if there is groups information in the output.

Do you also want to start with a fresh database? Can’t you just copy same database kr create a dump of it and import into new database?

Thank you wr00t for your reply. well, we are movieng the data base also , I have tried with the plugin to export the users but the groups are not exporting. however the all the users have been exported to the new server. is their a possible way we can get the groups also .? please help

I don’t know about such way, sorry.