« Blog Home

How to Integrate ClearCheck with your ClearCase Backup Script

ClearCheck, our add-on solution for monitoring the health of ClearCase enviornments, has a command line interface that enables administrators to include checks as part of the daily locking and unlocking of VOBs for backup.

To download a trial version, click here: https://www.almtoolbox.com/download.php?did=1

Windows
In most cases, the backup script includes the following steps:

  1. Lock all ClearCase VOBs
  2. Copy all VOBs into another folder, disk or storage , or make a file system snapshot
  3. Unlock all VOBs

The command to run ClearCheck can be inserted immediately after step 2, before the VOBs are unlocked in step 3.
Assuming that ClearCheck was installed in “C:\Program Files\GoMidjets\ClearCheck” directory, the command line will be:

“C:\Program Files\GoMidjets\ClearCheck\Clearcheck.exe” –exec

For example:
Assuming the following:

  1. Your backup script is the following PERL script for Windows (taken from IBM site).
  2. ClearCheck was installed in “C:\Program Files\GoMidjets\ClearCheck” directory

The end of the script will be as follows:

“c:\program files\GoMidjets\ClearCheck\Clearcheck.exe” –exec
system("cleartool unlock VOB:$VOBtag");
print "\n"; 

UNIX \ Linux
ClearCheck supports check on VOBs installed on UNIX \ Linux but its management is always installed on Windows. In order to integrate the daily checks, a mechanism for coordinating the two systems is required.
The backup script runs on Unix/ Linux and in most cases includes the following steps:

  1. Lock all ClearCase VOBs
  2. Copy all VOBs into another folder, disk or storage, or make a file system snapshot
  3. Unlock all VOBs

ClearCheck should perform the daily checks after the backup script has finished execution. For this reason, we configure the script to create a ‘flag’ file for ClearCheck to verify that it has finished running
Adding ClearCheck to the script requires 3 steps:

  1. Add a ‘touch’ command to your backup script. This command creates the flag file for ClearCheck.
  2. Schedule ClearCheck to run at the same time as the backup script but only start its daily checks after the flag file is created.
  3. Set ClearCheck to recognize the flag file.

For example, assuming the following:

  • Your backup script is the following script (Taken from “Backup Central” Wiki).
  • The script is scheduled to run at 4am every night.
  • The flag file is /tmp/ClearCheck on the VOB server.

Step 1: Add the ‘touch’ command, including the filename – just before the “__END__” line in the backup script. This creates the flag file that signifies that the backup script has finished execution.
printf "Backup script stopped : $tstamp \n";
touch /tmp/ClearCheck
__END__

Step 2.  Under the “Scheduler” tab in ClearCheck set the time, user and password for running daily checks, then press “Add Task”:

Schdule ClearCase maintenance health checks

Step 3. In ClearCheck specify this flag filename under the “DBcheck” tab in the appropriate textbox as shown below. ClearCheck will look for this file on the VOB at the scheduled hour, and wait until it is created before beginning daily checks

Synchronize ClearCheck with ClearCase backup

Download a trial version: https://www.almtoolbox.com/download.php?did=1

That’s all!