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.
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.
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.
# 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.
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:
# ccase-home-dir/etc/atria_start stop
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.
# mv /vobstore/vob_flex.vbs /vobstore/vob_flex.OLD
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:
# ccase-home-dir/etc/atria_start start
Load the backup. Re-create the VOB storage directory if necessary; then restore the VOB storage directory's contents from the backup medium.
# 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:
If you used tar(1) to back up the VOB, use the -p option when restoring the VOB. In addition, make sure to enter the tar command as the root user. If you do not, the -p flag is ignored.
If you used cpio(1) to back up the VOB, no special options are required in the cpio command that restores the backup data.
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.
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:
# 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
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.
Unlock the restored VOB.
# cleartool unlock vob:/flex
Unlocked versioned object base "/vobstore/flex.vbs".
If necessary, resynchronize the VOB and views. See VOB and View Resynchronization.
Feedback on the documentation in this site? We welcome any comments!
Copyright © 2001 by Rational Software Corporation. All rights reserved. |