cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
674
Views
0
Helpful
0
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Jack Parker on 06-08-2009 11:27:37 PM
A question arose this week concerning what would be possible to do to support CVP Reporting Server redundancy.  What follows is not a CVP DE developed process, nor is it something that is qualified or tested  in the DE environment, as such all testing and support must be by the provider (e.g. TAC will not provide any type of support).

While there is no "real time" redundancy strategy for the CVP Reporting server, a simple and effective strategy may be to restore the CVP Reporting Database backup to a secondary server.  

To accomplish this, there must be such a secondary reporting server set up.  This can be accomplished by installing a CVP Reporting server, which will Install the necessary Informix database and build the necessary data files.  In the example  to follow we will restore a reporting database from a server named PRODUCTION to a server named BACKUP.

The backup is typically performed on a daily basis as scheduled via OAMP.  This backup is placed into the %INFORMIXBACKUP%\cvp_db_backup\cvp_backup_data.

This file should be copied to the BACKUP server and placed into the same directory.

Informix backups expect to be restored to the database from which they were made, however it is possible to rename the backup files as part of the restore.  To accomplish this we need to make a file listing all of the dataspace files from production that we want to rename during the restore.  This file will look like:

D:\IFMXDATA\cvp_db_PRODUCTION\rootdbs_dat.000 0 E:\IFMXDATA\cvp_db_BACKUP\rootdbs_dat.000 0
D:\IFMXDATA\cvp_db_PRODUCTION\cvp_prim_dat.000 0 E:\IFMXDATA\cvp_db_BACKUP\cvp_prim_dat.000 0
D:\IFMXDATA\cvp_db_PRODUCTION\sbspace_dat.000 0 E:\IFMXDATA\cvp_db_BACKUP\sbspace_dat.000 0
D:\ifmxdata\cvp_db_PRODUCTION\cvp_temp_dat.000 0 E:\ifmxdata\cvp_db_BACKUP\cvp_temp_dat.000 0
D:\ifmxdata\cvp_db_PRODUCTION\cvp_plog_dat.000 0 E:\ifmxdata\cvp_db_BACKUP\cvp_plog_dat.000 0
D:\ifmxdata\cvp_db_PRODUCTION\cvp_data_dat.000 0 E:\ifmxdata\cvp_db_BACKUP\cvp_data_dat.000 0

Where the drive letters will match the respective PRODUCTION and BACKUP servers and where the names PRODUCTION and BACKUP will be replaced by the respective production and backup reporting server names.  The full path where these data files reside is specified in the %INFORMIXDATA% environment variable on each server.  Let us call this file rename.txt and put it into the same location as the cvp_backup_data file.  (Side note, the "0" after each file name is the offset into the file where the data starts, it is typically unsused and hence set to 0).

Finally, during the restore, Informix will expect to have a configuration file which points to the data files as listed on the production server.  Therefore we will change the following line in %INFORMIXDIR%\etc\%ONCONFIG%:

From:
ROOTPATH E:\IFMXDATA\cvp_db_BACKUP\rootdbs_dat.000 # Path for device containing root dbspace

To:
ROOTPATH D:\IFMXDATA\cvp_db_PRODUCTION\rootdbs_dat.000 # Path for device containing root dbspace

Again replacing the words PRODUCTION and BACKUP by the respective production and backup reporting server names.

NOTE: All of these file names are case sensitive.  If the case does not match exactly, there will be an error during the restore that either a source or destination file could not be located.

At this juncture we are ready to perform the actual restore.

This procedure involves shutting down the Informix server, performing the restore, then bringing the server back into multi-user mode.

The restore process has a number of options to allow incremental backups to be restored on top of the restore we have performed or to handle logical logs either before or after the restore, we will not be doing any of that.

In a Command window
(Start->Run->cmd):

cd %INFORMIXBACKUP%\cvp_db_backup
(Our cvp_backup_data and rename.txt files are here)

(Shutdown the Informix server)
onmode -yuk

(Start the restore)
ontape -r -rename -f rename.txt              (where rename.txt is the name of our rename file)

The backup file will be read and a series of questions asked - is this the backup you want to restore?  As well as:

   1. "y" to continue
   2. "n" to backup logs
   3. "n" level 1 archive
   4. "n" log tapes

After the restore is complete the Informix server should be in Quiescent mode.  This can be determined by issuing the following command:

onstat -

This can be repeated until the server is observed to be in quiescent mode as which point it can be brought into multi-user mode and made available to users with the following command:

onmode -m

At this juncture the engine should be available for use with data as of the date of the backup which was applied.

Subject: RE: CVP Reporting Server Redundancy
Replied by: Richard Parker on 15-10-2010 03:06:25 PM
Note that in CVP 8.01 there is a new utility in the %CVP_HOME%\bin directory called cvprestore.bat which will restore the reporting server database from backup on the local machine.  This will restore the compressed backup image stored in %INFORMIXBACKUP%\cvp_db_backup.  The database will be offline during the restore.
 
Database backups are page images of the running database.  That means that restoring a CVP 7.x or CVP 4.x image effectively reverts the database to the older version of the database.  This is a really bad idea.  If you need to restore an older image of the database, install the proper version of the CVP Reporting Server software before performing the restore. 
 
This also means that restoring a medium image to a large database will turn the database into a medium (and vice versa).
 
Regards,
Jack Parker
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links