Embedded DB and backing up

The embedded DB in wildfire has been a bit problematic when it comes to backing it up. It must write to the DB as our backup software is backing it up, and the backup software complains the data is in flux and doesn’t pass the verify stage. I am still learning this thing, so my question is can the DB be stopped for a short 5 minute period to finish the backup? Or, can the interval it writes be changed?

Hi,

a file copy produces a valid backup unless a breakpoint occurs within HSQLDB. So I guess that your backup software complains but the backup is still usable.

If you are running a monitoring plugin every minute things will be stored. If you are logging chat logs then the data is updated even more often. I’m quite sure that you don’t want to disable the one or the other. So you could try to decrease the size of the embedded-db/openfire.log file (more checkpoints will occur then) by editing embedded-db/openfire.properties. There’s a line “hsqldb.log_size=200” which means that the log file grows up to 200 MB and then a checkpoint occurs. Monitor the file a little bit to get an idea how much it grows every day. If it grows 10 MB per day you could try to change this value to 10 MB - a “successful” backup of a 10 MB file should be much more easy.

LG

Ok, that makes sense. The file would be smaller, hence quicker backup and less time spent keeping it open.

Once the file size has reached the defined limit and the checkpoint is reached, what happens? Does it get copied somewhere?

Hi,

the file contains the SQL which was executed since the last checkpoint. When the limit is reached the file is merged into the openfire.script file. Then it’s written again. So if you lose the openfire.log file you lose all modifications (update, deletes) since the last checkpoint. This is usually not a big prolem unless checkpoints occur only once a month.

LG

Checkpoints are occuring every few hours for us with the 200MB limit, so I think it would be an acceptable loss if the openfire.log file was not backed up. The openfire.script file is sooo much smaller, and at the end of every checkpoint it’s only incrementing by a meg or so… is the openfire.log file being compressed and merged into openfire.script or is unnecessary data being scrubbed out of it before the merge?