Copies the VOB databases of all local VOBs or replicas configured for database snapshot
Product | Command Type |
---|---|
ClearCase | command |
ClearCase LT | command |
Attache | command |
Platform |
---|
UNIX |
Windows |
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. 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.
The file /var/adm/atria/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:
NOTIFICATION_PROGRAM=/usr/atria/bin/notify
NOTIFICATION_LIST=root
CONFIRMATION_ON_SUCCESS=yes
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:
Where to put the VOB database snapshot
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.
Whether 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 looking for ClearCase or ClearCase LT anomalies.) The db_check pass occurs after all snapshots are complete on the local host.
UNIX only-Which users should be notified (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/atria/config/snapshot.conf. The snapshot.conf file also specifies the notification program to be used.
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 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.
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 Technical Support.
(UNIX) Sends mail to per VOB and per host notification lists.
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.
Identities: You must be root on UNIX. You must have an identity with the appropriate permissions to lock the VOB on Windows.
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.
Mastership: (Replicated VOBs only) No mastership restrictions.
vob_snapshot's operation is recorded in the file /var/adm/atria/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:
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:
ERROR: The snap_to directory for vob /vobs/src is not writable
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.
/usr/atria/etc/vob_snapshot_setup lsvob
/vobs/src
/vobs/lib
/usr/atria/etc/vob_snapshot
Add local VOB \vob_prj to the current host's snapshot list. Then, take VOB database snapshots for all VOBs in the list.
cd "c:\Program Files\Rational\ClearCase\etc"
vob_snapshot_setup modparam -dbcheck yes -snap_to \\saturn\bigdisk\snaps\proj1 \vob_prj1
vob_snapshot
/var/adm/atria/config/snapshot.conf
/var/adm/atria/log/snapshot_log
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 © 2001 by Rational Software Corporation. All rights reserved. |