powered by Jive Software

Application back up

Question I would like to write a script that will automatically back up the DB and all files. How do I shut down any services via command line and restart them?

Thanks

glen

write a batch file that executes the services start and stop functions of the service. If you are using windows:

“C:\Progam Files\Openfire\bin`openfire-service /stop”`

Run this bat file as a scheduled task with credentials to run when not logged in.

Then create a new scheduled task to start openfire after the backup

“C:\Progam Files\Openfire\bin`openfire-service /start”`

If you use an external DB you do not need to do this at all. Just schedule a backup the db using the db tools for your type of database (MySQL, MSSQL, etc), then make a static copy of the openfire folder. This will give you the plugins, and config files you need for a fast restore.

Todd,

We use BackupExec at our company as our back up tool.

I’m using the embedded database with OpenFire.

Do I need to stop the services before I copy the OpenFire directory or is it merely a suggestion?

  • Earl.

Earl,

Your BackupExec should be able to handle shadow copying and openfile management. So it should work with out having to do so… but at the same time it does not hurt to disable the service when your back ups are running.

glen

Thanks, Glenn. I really appreciate the response.

Hi Earl,

as you are “using the embedded database with OpenFire” you can make a simple file copy.

See http://hsqldb.sourceforge.net/web/hsqlFAQ.html - HSQLDB employs a redo log for data recovery. All the changes to the database are reflected in this log. Extensive user tests have demonstrated this mechanism to be effective and fail-safe in most cases. For added security, you can backup the database files while the engine is running.

LG