BackPrevious Page Next PageNext

Managing Server Data

Checking server data integrity

Backing up and restoring server data

Archiving and restoring server data

Viewing the summary information of archive files

Clearing invalid nodes from the server database

During its running process, JReport Server keeps track of server information and stores it to its own database for the purpose of running various managing and monitoring tasks, such as managing the resources on the server, monitoring the task running status, and collecting server running statistics.

The server database includes system, realm, and profiling. The system database holds resources of the global server scope, such as server.properties, global NLS, and so on. The realm database holds information of folders, nodes, versions, the security system, and the completed table. The profiling database holds server runtime related information. You can refer to Configuring the Server Database for details about how to configure the databases. This section shows managing server data in detail.

Checking server data integrity

In abnormal circumstances, server data may not be saved correctly or completely in the databases. JReport Server allows you to check the integrity of server data.

The integrity check mainly examines two aspects of the realm database:

If any inconsistent or incomplete server data is found, it will be removed from the realm database since it is unused. The same process also applies to files.

To check server data integrity, do one of the following:

Note: The integrity check checks only the realm database.

Backing up and restoring 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 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.

The Backup and 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.

To back up server data:

You have two alternatives for backing up the server data: through the server console or through command line.

To restore 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.

  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

Notes:

Archiving and restoring server data

Along with the running of the server, the sizes of the result version table (DB: realm) and TaskContext table (DB: profiling) grow larger. JReport Server allows you to archive data to a single backup file then automatically delete it from the database. You can then retrieve the data from the backup file at a later date. However you can only restore server data from an archive file that is archived using the same server version.

Only administrators can archive and restore server data in the realm and profiling databases.

To archive the server data:

  1. In the JReport Server console, point to Administration on the system toolbar, and then click Configuration > Server DB > Realm DB/Profiling DB from the drop-down menu.
  2. In the Realm DB/Profiling DB page, switch to the Archive tab.

    Archive tab

  3. Select a realm from the Select Realm drop-down list at the top right corner.
  4. In the Archive Result Version Data panel, the Data Scope text field displays the result version data range and Records Count shows the number of sets of result version data in the database.
  5. In the Move to Archive Data Before text field, specify the range of data you want to archive. The range is defined using date, for example, you can archive data before a certain date.
  6. Type or click the Browse button to specify the file path and name for the archive file.

    If you don't want to backup the archived server data, leave this field blank. The server data will then be removed from the database.

  7. Click Archive. Server data prior to the specified date will be archived and saved to the archive file using the name specified and the same data will be deleted from the database.

To restore the archived server data:

  1. In the JReport Server console, point to Administration on the system toolbar, and then click Configuration > Server DBRealm DB/Profiling DB from the drop-down menu.
  2. In the Realm DB/Profiling DB page, switch to the Archive tab.
  3. Select a realm from the Select Realm drop-down list.
  4. In the Restore Result Version Data panel, type or click the Browse button to provide the archive file name and location in the Restore from Archive text field.
  5. Click Restore to restore the specified data.

Viewing the summary information of archive files

After archiving or backing up the realm and profiling databases, you can view the results. The summary information includes Archive, Date, Type, Version, Realm, Database and Scope.

  1. In the JReport Server console, point to Administration on the system toolbar, and then click Configuration > Server DBRealm DB/Profiling DB from the drop-down menu.
  2. In the Realm DB/Profiling DB page, switch to the Summary tab.

    Summary tab

  3. Select a realm from the Select Realm drop-down list at the top right corner.
  4. In the Archive text field, type or click the Browse button to specify the data file from which you want to retrieve summary information.
  5. Click Summary. JReport then begins the summary process and returns summary information about the specified file.

Clearing invalid nodes from the server database

When resources, such as folders, catalogs, and reports, have been published using a real path, there is a possibility to produce invalid nodes. Also, after running a report and saving the result to the versioning system or scheduling reports which are saved in the versioning system, either of the following operations will generate invalid nodes:

The invalid nodes are generated in the realm database. They are links to files in the history folder that no longer exist. To clear them:

  1. In the JReport Server console, point to Administration on the system toolbar, and then click Configuration > Server DBRealm DB from the drop-down menu. The Realm DB page is displayed.
  2. Click the Realm DB Check tab.

    Realm DB Check tab

  3. Select a realm from the Select Realm drop-down list at the top right corner.
  4. Click the Check button. All invalid resource nodes are then listed.
  5. Check the checkbox on the header of the first column to specify whether you want to select all or unselect all. Otherwise, you can check the corresponding checkbox to select the invalid nodes that you want to delete.
  6. Click Delete button to delete all selected nodes.

BackPrevious Page Next PageNext