vob_snapshot

Copies the VOB databases of all local VOBs or replicas configured for database snapshot

Applicability

Product

Command type

VersionVault

command

Platform

UNIX®

Linux®

Windows®

Synopsis

vob_snapshot

Description

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 and Linux Only—Per host snapshot parameters

The file /var/adm/hcl/versionvault/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=/opt/hcl/ccm/versionvault/bin/notify
NOTIFICATION_LIST=root

CONFIRMATION_ON_SUCCESS=yes

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:

  • Where 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.

  • 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 for VersionVault anomalies.) The db_check pass occurs after all snapshots are complete on the local host.

  • UNIX and Linux 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/hcl/versionvault/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 and Linux) or versionvault-home-dir\var\log\snap_log (Windows) file along the way):

  1. Verifies that the snapshot target directory exists and is writable.
  2. Locks the VOB. If vob_snapshot cannot lock the VOB, it proceeds with the snapshot, but logs the snapshot's status as questionable.
  3. Checks the VOB's specified snapshot target directory for sufficient disk space.
  4. 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).
  5. Copies the VOB database directory tree to the subdirectory created in Step 3
  6. Unlocks the VOB.
  7. Repeats Step 1 through Step 6 for the next VOB.
  8. Runs db_check on all VOBs configured for this check.
    Note: If the log or UNIX or Linux notification mail reveals a failed db_check, check the log for obvious errors. If you cannot resolve the problem, contact HCL Customer Support.
  9. (UNIX and Linux) 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 or Linux 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.

Restrictions

Identities

You must be root on UNIX or Linux. 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 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.

Mastership

(Replicated VOBs only) No mastership restrictions.

Options and arguments

None.

The snapshot log

vob_snapshot's operation is recorded in the file /var/adm/hcl/versionvault/log/snapshot_log or

versionvault-home-dir\var\log\snap_log. If UNIX or Linux 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:

ERROR: The snap_to directory for vob /vobs/src is not writable

Examples

  • On a UNIX or Linux system, 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.

    /opt/hcl/ccm/versionvault/etc/vob_snapshot_setup lsvob

    /vobs/src
    /vobs/lib

    /opt/hcl/ccm/versionvault/etc/vob_snapshot

  • On a Windows system, 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\HCL\CCM\versionvault\etc"
    vob_snapshot_setup modparam –dbcheck yes  ^
    –snap_to \\saturn\bigdisk\snaps\proj1\vob_prj1 vob_snapshot

UNIX and Linux files

  • /var/adm/hcl/versionvault/config/snapshot.conf
  • /var/adm/hcl/versionvault/log/snapshot_log

Windows files

  • versionvault-home-dir\var\log\snap_log

Windows registry keys

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Atria\ClearCase\CurrentVersion\snapshot