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 version table, and report 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 JReport Administration page, click Data on the system toolbar and then select System DB/Realm DB/Profiling DB from the drop-down menu.
  2. Select a realm if it is the Realm DB or Profiling DB panel.
  3. Click the Backup tab, type the file path and name in the Backup System DB/Realm 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 -Bsystemtables/-Brealmtables/-Bprofiling or -B0realmtables parameter. For example:

    C:\JReport\Server\bin>DBMaintain -Brealmtables:C:\TEMP\cmd_b_realmtables.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 -Rsystemtables/-Rrealmtables/-Rprofiling or -R0realmtables 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 -Rsystemtables/-Rrealmtables/-Rprofiling or -R0realmtables parameter, for example:

    C:\JReport\Server\bin>DBMaintain -Rrealmtables:C:\TEMP\cmd_b_realmtables.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.

Notes: