9.4 Restoring a VOB from Backup Without vob_restore

In most cases, the easiest way to restore your VOB is to run the vob_restore utility and follow its instructions. The procedure presented here is an alternative approach for circumstances in which you cannot use vob_restore and for administrators who prefer to do it themselves.

The following procedure restores a VOB backup without disrupting ongoing work. The VOB is the same one discussed in Backing Up a VOB.

  1. Log on to the ClearCase LT server. Log on as a user with permission to stop and start ClearCase; typically this is the root user on UNIX or a local administrator on Windows.

  2. Check available disk space. If you are restoring the VOB to a new location, make sure that there is enough free space in the VOB's disk partition to load the backup copy into temporary storage. Use the VOB storage node in the ClearCase Administration Console or the cleartool space command to check available disk space.

  3. # cleartool space /vobstore/flex.vbs
    Use(Mb) %Use Directory
    27.0 2% VOB database /net/pluto/vobstore/flex.vbs
    33.0 3% cleartext pool /net/pluto/vobstore/flex.vbs/c/cdft
    .
    .
    ----------------------------------------------------------------------
    312.9 28% Subtotal
    828.4 74% Filesystem /net/pluto/vobstore (capacity 1115.1 Mb)

    If the available space is insufficient, delete the VOB storage directory, or use other means to make enough space available.

WARNING: Step #4 and Step #5 are critical to the integrity of your restored VOB.

  1. Shut down ClearCase on the ClearCase LT server. This ensures that ClearCase processes associated with the VOB are terminated. On Windows, use the ClearCase program in Control Panel. On UNIX, use the following command:

  2. # ccase-home-dir/etc/atria_start stop

  3. Rename the VOB storage directory. If it still exists, rename the VOB storage directory. A new one with the same name will be created during restore.

  4. # mv /vobstore/vob_flex.vbs /vobstore/vob_flex.OLD

  5. Restart ClearCase on the ClearCase LT server. Starting ClearCase makes other VOBs on the ClearCase LT server available. Do this on Windows by using the ClearCase program in Control Panel. On UNIX, use the following command:

  6. # ccase-home-dir/etc/atria_start start

  7. Load the backup. Re-create the VOB storage directory if necessary; then restore the VOB storage directory's contents from the backup medium.

  8. # mkdir /vobstore/vob_flex.vbs
    # cd /vobstore/vob_flex.vbs
    <enter restore command>

    If your Windows backup tool does not backup and restore ACLs correctly, you may need to fix them now. See Chapter 20, Repairing VOB and View Storage Directory ACLs on Windows, for details.

    NOTE: Each UNIX VOB storage area includes a directory named .identity, which stores files with special permissions: the setUID bit is set on file uid; the setGID bit is set on file gid. You must preserve these special permissions when you restore a VOB backup:

  9. Lock the VOB. As a precaution, lock the VOB as soon as the restore is complete. This will prevent any users from changing VOB data until the restore has been checked for consistency.

  10. If you restored the VOB to a new location, re-register the VOB. For example, if you restored the VOB to new location /vobst_aux/flex.vbs:

  11. # cleartool unregister -vob /vobstore/flex.vbs (run unregister first)
    # cleartool register -vob /vobst_aux/flex.vbs
    # cleartool mktag -vob -replace -tag /vobs/flex /vobst_aux/flex.vbs

  12. While the VOB is still locked, run some consistency checks. Load VOB data into a view and confirm that it is intact by checking event history on various components, examining recently changed elements, running checkvob as described in Using checkvob, and so on.

  13. Unlock the restored VOB.

  14. # cleartool unlock vob:/flex
    Unlocked versioned object base "/vobstore/flex.vbs".

  15. If necessary, resynchronize the VOB and views. See VOB and View Resynchronization.