Backing up/restoring server data

Backing up server data

The server data backup process inspects all of the tables in the database, collecting and then exporting all table data to a ZipEntry. For certain tables, such as the catalog version table, report set version table, and report set result version table, the data also includes relational real files from the history directory. All server data is compressed to a single Zip file, and all table data and every relational real file is stored as a ZipEntry in this single file.

You have two alternatives for exporting the server data: through the server user interface or through command line.

Exporting the server data through the server user interface
  1. On the system toolbar of the JReport Administration page, click Data.
  2. Select a realm from the Select Realm drop-down list.
  3. Select the System DB/Profiling DB tab.

    Note: The Profiling DB tab is not shown by default. To show this tab, set the server.profiling.enable property to true in the server.properties file in the <install_root>\bin directory.

  4. Click the Backup sub tab, type the file path and name in the Backup System DB/Profiling DB field (or use the Browse button to specify the file path), and then click Backup. Note that the file extension should be included.
Exporting the server data through the command line on Windows or on UNIX/Linux

A tool is provided to backup the server data. It is DBMaintain.bat/DBMaintian.sh in <install_root>\bin. It has two parameters:

To export the server data from the command line on Windows or on UNIX/Linux:

  1. In a DOS window, switch to the <install_root>\bin folder.
  2. Use the DBMaintain command (DBMaintain.sh on UNIX/Linux) and -Bsystables/-Bprofiling or -B0systables/-B0profiling parameter. For example:

    C:\JReport\Server\bin>DBMaintain -Bsystables:C:\TEMP\cmd_b_systables.dat -Bprofiling:C:\TEMP\cmd_b_profiling.dat

Restoring server data

The server data restore process picks up all table data from the backup file and inserts it into the corresponding table in the database. You can only restore server data using the DBMaintain tool with the -Rsystables/-Rprofiling or -R0systables/-R0profiling parameter.

To import server data using the command line:

  1. In the DOS window, switch to the <install_root>\bin folder.
  2. Use the DBMaintain command and -Rsystables/-Rprofiling or -R0systables/-R0profiling parameter, for example:

    C:\JReport\Server\bin>DBMaintain -Rsystables:C:\TEMP\cmd_b_systables.dat -Rprofiling:C:\TEMP\cmd_b_profiling.dat

Backup/restoration limitations

The backup/restore feature does not support cross-platform operation. The backup and restore operations must be done on the same operating system. For example, if you backup the server data to a zip file on a Windows platform, you will then not be able to restore it on a UNIX system.