Dumping and restoring the database

Bedework provides utilities to dump and restore data in XML format.  This provides a simple way to back up your work and get a feel for working with Bedework data. 

Bedework Quickstart Data Files

The quickstart ships with two initialization files:
<jboss-dir>/server/default/data/bedework/dumprestore/initbedework.xml
<jboss-dir>/server/default/data/bedework/dumprestore/initbedework-sparse.xml

The “initbedework.xml” data contains a basic calendar structure, many categories, two calendar suites, and the handful of users & groups that allow the quickstart demonstration to run. It is a good starting point for most deployments.  No events are included.

The “-sparse” version contains no events, no categories, no locations, no contacts, and the barest of calendar structures.  It is a good starting point if you want to build up a system from scratch.

JMX Console

Bedework uses the JMX console built into JBoss to dump and restore data.  In the default quickstart distribution, you get to the JMX console by navigating to “JMX Console” from the root of the JBoss server at http://localhost:8080/ or by directly visiting http://localhost:8080/jmx-console/

User name: admin
Password: bWjmx00  (if this password doesn't work, or to change the password (encouraged!), see Securing Bedework )

To dump a data file:

  1. With Bedework running, go to the JMX console: http://localhost:8080/jmx-console/
  2. Select “org.bedework” from the “Object Name Filter” menu to the left of the page.
  3. Select “service=DumpRestore”
  4. You will be presented with a form allowing you to manage the dump/restore process.
  5. The “DataOut” attribute tells Bedework where to put the file.  By default, this is in <jboss-dir>/server/default/data/bedework/dumprestore/
  6. If you've changed any attributes, click “Apply Changes”
  7. Click “Invoke” for the “dumpData” operation.
  8. You should find a file with a name similar to “bwdata20100205T130857.xml” in your DataOut directory.

To restore a data file:

  1. Stop the Bedework system if running.
  2. Delete (or rename) the following directories
    1. <jboss-dir>/server/default/data/bedework/hypersonic/CalDb3p7.*
    2. <jboss-dir>/server/default/data/activemq
    3. <jboss-dir>/server/default/data/activemq-data
    4. <jboss-dir>/server/default/data/bedework/lucene
  3. Start the Bedework system.  The first three directories above should be recreated, and you should see an error in the log “Schema 'SA' does not exist”, which is HSQL complaining about not finding the Bedework schema that you've just removed.
  4. Go to the JMX console: http://localhost:8080/jmx-console/
  5. Select “org.bedework” from the “Object Name Filter” menu to the left of the page.
  6. Select “service=DumpRestore”
  7. You will be presented with a form allowing you to manage the dump/restore process.  The “DataIn” attribute should point at the xml datafile you wish to restore.  By default, this is the initbedework.xml file. 
  8. Initialize the schema:
    1. Set the attribute “Export” to True
    2. Set the attribute “Create” to True
    3. Click “Apply Changes” to set the values.
    4. Click “Invoke” for the “schema” operation.
  9. Restore the data:
    1. Navigate back to the DumpRestore service (click “Back to MBean”)
    2. Click “Invoke” for the “restoreData” operation.

To create an empty system:

To install a system that contains no events, no categories, no locations, no contacts, and the barest of calendar structures, follow the steps above to restore initbedework-sparse.xml.

Bedework Enterprise Calendar, version 3.8