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 scheduler runs vob_snapshot periodically. For information about describing and changing scheduled jobs, see the schedule reference page. 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”.
UNIX Only—Per Host Snapshot Parameters
The file /var/adm/rational/clearcase/config/snapshot.conf stores information used to notify interested parties of VOB database snapshot activity on a particular host. Here are the parameters in snapshot.conf and their default values:
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 individual components of the attribute string specify the following:
to put the VOB database snapshot
A disk location to store the snapshot. Typically, this location is backed up later (along with the VOB storage directory as part of normal backup operations), and it is overwritten by the next snapshot.
to run db_check on the VOB database snapshot
The db_check utility performs fundamental database consistency and integrity checks. (Later, at recover time, checkvob may examine the VOB database for ClearCase or ClearCase LT anomalies.) The db_check pass occurs after all snapshots are complete on the local host.
only—Which users to notify (receive mail) about snapshot operations
on this VOB
A list of user names to be notified when vob_snapshot processes this VOB. This per-VOB list supplements the per-host notification list maintained in /var/adm/rational/clearcase/config/snapshot.conf. The snapshot.conf file also specifies the notification program to be used.
For more information about setting these parameters for a particular VOB, see vob_snapshot_setup.
Database Snapshot Details
When vob_snapshot encounters a VOB that is configured for database snapshot, it performs the following steps (logging messages in the snapshot_log (UNIX) or ccase-home-dir\var\log\snap_log (Windows) file along the way):
- Verifies that the snapshot target directory exists and is writable.
- Locks the VOB. If vob_snapshot cannot lock the VOB, it proceeds with the snapshot, but logs the snapshot's status as questionable.
- Checks the VOB's specified snapshot target directory for sufficient disk space.
- Creates a subdirectory whose name is the VOB's replica UUID. If a directory with that name already exists, remove it first (that is, remove the previous snapshot).
- Copies the VOB database directory tree to the subdirectory created in Step 3
- Unlocks the VOB.
- Repeats Step 1 through Step 6 for the next VOB.
- Runs db_check on
all VOBs configured for this check.
Note: If the log or UNIX notification mail reveals a failed db_check, check the log for obvious errors. If you cannot resolve the problem, contact Rational Customer Support.
- (UNIX) Sends mail to per VOB and per host notification lists.
If You Do Not Use vob_snapshot
You must lock the VOB and back up the entire VOB storage directory (and any remote UNIX storage pools). 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.
You must be root on UNIX. You must have an identity with the appropriate permissions to lock the VOB on Windows.
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 because 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.
THE SNAPSHOT LOG
vob_snapshot's operation is recorded in the file /var/adm/rational/clearcase/log/snapshot_log or ccase-home-dir\var\log\snap_log. If UNIX snapshot notification mail indicates a problem with any snapshot, consult the snapshot_log file. Here are some common error and status messages:
Successful snapshot messages:
NOTE: VobTag: /vobs/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:
Note: In the UNIX examples that follow, arguments and output that show multicomponent VOB tags are not applicable to ClearCase LT, which recognizes only single-component VOB tags. In this manual, a multicomponent VOB tag is by convention a two-component VOB tag of the form /vobs/vob-tag-leaf—for example, /vobs/src. A single-component VOB tag consists of a leaf only—for example, /src. In all other respects, the examples are valid for ClearCase LT.
- List all VOBs on the local host's snapshot list (VOBs to which snapshot parameters have been applied with vob_snapshot_setup modparam). Then, take VOB database snapshots for all VOBs in the list.
- Add local VOB \vob_prj to the current host's snapshot list. Then, take VOB database snapshots for all VOBs in the list.