powered by Jive Software

Location and structure of embedded-db?

Folks;

so far running OpenFire using the embedded db, I am, as things get a little more load internally, thinking about how to meaningfully back up the whole structure, and consequently stumbled across the question how to back up the database in OpenFire, too. Ultimately, I read a lot about embedded-db being backed up all along with backing up the openfire installation folder, too, yet I wonder where the database actually lives. My installation (CentOS 6.x) lives in /opt/openfire/openfire, so I kind of expected the database files to live there, too. However, examining the folder I just see these four files:

-rw-rw-r--. 1 remote remote     16 12. Jan 10:01 openfire.lck
-rw-rw-r--. 1 remote remote 716833 12. Jan 09:34 openfire.log
-rw-rw-r--. 1 remote remote    410  2. Jan 17:02 openfire.properties
-rw-rw-r--. 1 remote remote 194507  2. Jan 17:00 openfire.script

I hardly have any experience administering hsqldb instances at runtime, but somehow I wonder where the db actually does keep its data. Asking the other way 'round: Is this all there is supposed to be in there? Am I missing something? Or is this all it needs to get the db up and running?

TIA and all the best,

Kristian

openfire.script is your “database”. Actually hsqldb is a text file with all the sql commands (you can open it with a text editor and see). This database is loaded into memory and is held in memory all the time after the Openfire starts. So, you can backup this folder, or this file, or just whole openfire folder. You can also do it online, but you may lose some information (as it is still held in the memory or caches), so it is better to do offline backups with Openfire turned off.

@You can also do it online: This is completely true, the write delay is 20 seconds. So as long as 20s information lost are acceptable an online copy is fine. The backups are fine unless a checkpoint occurs during backup. (checkpoint = openfire.log reaches 20 MB).

1 Like

Thanks wroot, LG, for your help and clarifying this.

I second this. We have our openfire server installed on a windows 2008 server and I created a script to stop the openfire service, xcopy the openfile folder to another location and then start the service again. I scheduled the script to run every week after hours. The benefit is not only a regular backup, but a regular refresh of the openfire server. Works really good. Now I just need to auto zip the folder

I have the same question but running Raspian. Don’t find Openfire.Script on my drive.
/etc/openfire has only

Security (folder)
log4j2.xml
log4j.xml
openfire.xml
openfire.xml.dpkg-dist
security.xml