Copies the VOB databases of all local VOBs or replicas configured for database snapshot
ClearCase (administrative command), Attache (administrative command)
The vob_snapshot command makes an on-disk copy of a local, locked VOB database. Using this command reduces the amount of time a VOB database needs to be locked when you back up the VOB. Later, as part of your standard system backup procedure, the VOB storage directory (minus the VOB database directory) and the VOB database snapshot can be backed up without locking the VOB. Because the database snapshot and VOB storage pool backups occur at different times, they are likely to be slightly out of sync. To correct this skew, the checkvob utility resynchronizes the VOB database and storage pools when you run vob_restore.
By default, the ClearCase scheduler runs vob_snapshot periodically. See the schedule reference page for information on describing and changing scheduled jobs. If no locally stored VOBs are configured for database snapshot, vob_snapshot exits silently.
A local VOB's database is copied only if snapshot parameters have been applied to it with the vob_snapshot_setup utility. See Per VOB (or Replica) Snapshot Parameters.
When vob_snapshot runs on a VOB host, it checks each locally stored VOB for the existence of a multipart string attribute that specifies snapshot parameters. An administrator uses the vob_snapshot_setup utility to apply the vob_snapshot_parameters attribute to each VOB or replica for which snapshots will be taken. The attribute string's individual components specify the following:
A disk location that will store the snapshot. Typically, this location gets backed up later (along with the VOB storage directory as part of normal backup operations), and it is overwritten by the next snapshot.
The db_check utility performs fundamental, non-ClearCase-related database consistency and integrity checks. (Later, at recover time, checkvob may examine the VOB database looking for ClearCase anomalies.) The db_check pass occurs after all snapshots are complete on the local host.
See vob_snapshot_setup for more information on setting these parameters for a particular VOB.
When vob_snapshot encounters a VOB that is configured for database snapshot, it performs the following steps (logging messages in the ccase-home-dir\var\log\snap_log file along the way):
NOTE: If the log reveals a failed db_check, check the log for obvious errors. If you cannot resolve the problem, contact Rational Technical Support.
You must lock the VOB and back up the entire VOB storage directory. Such a backup avoids the issue of skew between VOB database snapshot and VOB storage pools (which are typically backed up some time after the snapshot), but it requires that the VOB remain locked during the entire backup operation.
Permissions Checking: You must have the appropriate permissions to lock the VOB. See the permissions reference page.
Locks: The VOB must be locked to guarantee the integrity of a database snapshot. If vob_snapshot cannot lock the VOB (because it is run with insufficient permissions, or another user locked the VOB), it proceeds with the copy operation but logs the snapshot's status as "questionable." This status is upgraded to "successful" if the optional post-snapshot db_check pass succeeds.
This sample backup/recover scenario uses the utilities vob_snapshot_setup, vob_snapshot, and vob_restore.
"c:\Program Files\Rational\ClearCase\etc\vob_snapshot_setup" modparam ^
-dbcheck yes -snap_to \\saturn\bigdisk\snaps\vob_src \vob_src
The VOB database is copied to a subdirectory of the -snap_to directory you specify. The subdirectory name matches the VOB's replica UUID (which you can display with vob_snapshot_setup lsvob -long). In this example, the snapshot is stored in ...\snaps\vob_src\replica-uuid.
NOTE: If run without command line options, vob_snapshot_setup modparam prompts for all necessary input and displays explanatory text.
"c:\Program Files\Rational\ClearCase\etc\vob_snapshot_setup" lsvob
\vob_src
...
NOTE: Although \vob_src must be locked at database snapshot time, it need not be locked when your normal backup routine saves the snapshot and VOB storage directory.
A common routine is to run vob_snapshot early in the morning or at lunch time, when the VOB lock is least likely to interfere with nightly builds, and to back up VOB storage directories at night.
cmd-context lock -c "vob recover required" vob:\vob_src
NOTE: The most recent snapshot may still be on disk, or it may be on backup media.
cmd-context lsvob \vob_src |
\vob_src \\io\vobstore\vob_src.vbs |
"c:\Program Files\Rational\ClearCase\etc\vob_restore" \vob_src
NOTE: If run without command line options, vob_restore prompts for all necessary input and displays explanatory text.
vob_restore does the following:
cmd-context mktag -vob -tag \vob_src \\io\vobstore\vob_src.vbs
cmd-context register -vob \\io\vobstore\vob_src.vbs
See also vob_snapshot_setup and vob_restore.
vob_snapshot's operation is recorded in the log file ccase-home-dir\var\log\snap_log. Here are some common error and status messages from snap_log:
NOTE: VobTag: \vob_src
NOTE: Replica UUID: 0b9ccb24.8dc211cf.af59.00:01:80:73:db:6f
NOTE: Family UUID: 0b9ccb20.8dc211cf.af59.00:01:80:73:db:6f
NOTE: Dbcheck succeeded
NOTE: SNAPSHOT COMPLETED SUCCESSFULLY
The following messages may be generated when vob_snapshot runs on an unlocked VOB. If the database check passes, the snapshot is upgraded from "questionable" to "successful." You should always lock a VOB before copying its VOB database with vob_snapshot.
ERROR: Could not lock the replica for the copy. Copied anyway.
ERROR: The snap was done without the vob lock in place.
ERROR: SNAPSHOT QUESTIONABLE
NOTE : The snap was done unlocked but the database checked ok
The following error occurs if the user account under which vob_snapshot executes does not have permission to overwrite the directory supplied as a -snap_to argument to vob_snapshot_setup:
ERROR: The snap_to directory for vob \vob_src is not writable
cd "c:\Program Files\Rational\ClearCase\etc"
vob_snapshot_setup lsvob
\vob_src
\vob_lib
vob_snapshot
cd "c:\Program Files\Rational\ClearCase\etc"
vob_snapshot_setup modparam -dbcheck yes -snap_to \\saturn\bigdisk\snaps\proj1 \vob_prj1
vob_snapshot
ccase-home-dir\var\log\snap_log
HKEY_LOCAL_MACHINE\SOFTWARE\Atria\ClearCase\CurrentVersion\snapshot
checkvob, schedule, vob_restore, vob_snapshot_setup
|
Feedback on the documentation in this site? We welcome any comments!
Copyright © 1999 by Rational Software Corporation. All rights reserved. |