9.2 Backing Up a VOB

Because of operating system differences, VOB backup operations are handled differently on UNIX and Windows. All VOB backup operations begin with locking the VOB. This step is critical to the integrity of any VOB backup.

Backing Up a VOB on UNIX

A VOB backup on UNIX can be summarized as follows:

  1. Lock the VOB.

  2. Back up the VOB storage directory.

  3. Unlock the VOB.

By default, a VOB storage directory is wholly contained in a single directory tree, which resides in a single disk partition. If you use a file-oriented backup tool, you specify only the VOB storage directory to ensure a complete backup. If you use a disk-partition-oriented backup tool, you specify only the partition name.

Backing Up a VOB on Windows

VOB storage on Windows is wholly contained in a single directory tree, which simplifies the backup process. A VOB backup on Windows can be summarized as follows:

  1. If your backup software can be configured to capture files that are open for write access:

    1. Lock the VOB

    2. Back up the VOB storage directory.

    3. Unlock the VOB.

  2. If your backup software cannot process files that are open for write access, you must stop ClearCase on the ClearCase LT server, back up the VOB storage directory, restart ClearCase, and unlock the VOB.

WARNING: Many Windows backup utilities do not back up files that are open for writing. Because the VOB database files are typically in this state while ClearCase is running, even when the VOB is locked, your backup operation skips these files unless you stop ClearCase before performing the backup. Unless your backup software can capture files open for write access, you must stop ClearCase on the VOB host before performing a backup. To stop ClearCase on the ClearCase LT server, use the ClearCase program in Control Panel.

Choosing Between Standard and Semi-Live Backup

The standard backup procedure is to lock the VOB and back up the entire VOB-VOB database, plus VOB storage pools and various other files in the VOB storage directory. The VOB must remain locked for the duration of the backup. Keeping VOB database and storage pools synchronized on backup media is desirable; the standard backup procedure is recommended for all sites that can accept the duration of required locks. Locking a VOB prevents checkins, checkouts, and other operations that affect VOB data and metadata. These include UCM deliver operations and any UCM rebase operations that require merging. Other development tasks, such as editing, compiling, and debugging, can take place while a VOB is locked.

As illustrated in Figure 9, semi-live backup involves backing up the two major pieces of a VOB separately, as follows:

Figure 9 Semi-Live Backup

Benefits of Semi-Live Backup
Costs of Semi-Live Backup
Enabling Semi-Live Backup

To enable database snapshots, run vob_snapshot_setup on a VOB. This command causes the ClearCase LT scheduler to run vob_snapshot periodically on the VOB (daily, by default). The vob_snapshot and vob_snapshot_setup reference pages explain these operations. Consult them if you choose to use semi-live backup.

The backup procedures that follow accommodate (but do not require) snapshot-enabled VOBs. However, their focus is the standard backup approach, which requires the VOB to be locked for long enough to back up the database and all the pools. The vob_restore procedure applies equally to VOBs with and without database snapshots.

Deferred Source Container Deletion

Deferred deletion is enabled by the vob_snapshot_setup program. It ensures that the source pool will contain all needed containers when a backup program archives an active VOB. When a container is replaced by new version data (for example, during a checkin), the new container is created and the client requests the vob_server to remove the old container. If deferred deletion is deactivated, the container is immediately removed. If deferred deletion is enabled, the old container is added to a list of pending deletions, and it is removed in 30 minutes. Keeping source data containers for 30 minutes increases disk space requirements. The increase can be substantial during any 30-minute interval of heavy VOB checkin activity.

On UNIX platforms, you can execute the kill -HUP command on the vob_server process to send deferred deletion statistics to the vob_server log (see also getlog and getlog -gr).

When checkvob examines source pools, it reports containers on the deferred deletion list.

The deferred deletion list is written every five minutes to the file delete_list.db in the VOB storage directory.

Determining a VOB's Location

To determine the location of a VOB storage directory, use the ClearCase Administration Console or the cleartool lsvob command. If your backup program runs locally, it probably uses the VOB server access path. If your backup program runs over the network, it probably uses the Global path.

cleartool lsvob -long \vob_flex
Tag: \flex
Global path: \\ccsvr01\vobstore\vob_flex.vbs
.
.
.
VOB on host: ccsvr01
VOB server access path: c:\vobstore\vob_flex.vbs

Specify the appropriate pathname to your backup program.

NOTE: Some UNIX utilities that back up entire disk partitions require you to specify the disk partition where the VOB storage directory resides.

Ensuring a Consistent Backup

A backup represents a self-consistent snapshot of a VOB storage directory's contents only if the VOB is not modified while the backup program is working. That's why it is essential to lock the VOB before backing it up and unlock it after the backup completes.

WARNING: Regardless of your chosen backup strategy (see Choosing Between Standard and Semi-Live Backup), you must lock the VOB against all users. Use the ClearCase Administration Console or the Windows Explorer shortcut menu to lock the VOB. If you use the cleartool lock command, do not use the -nusers option. The lock is mandatory. It is not sufficient to capture a VOB that happens to be idle. The lock does more than ensure that no one modifies the VOB. It also causes the VOB to flush a database checkpoint to disk before backup. A VOB lock applied with the -nusers option does not perform the required database checkpoint.

Locking and Unlocking a VOB

You must be a privileged user to lock or unlock a VOB. There are several GUIs that support VOB locking, as well as two cleartool commands.

You can lock or unlock a VOB on any UNIX or Windows host from the ClearCase Administration Console:

  1. Navigate to the VOB storage node for the VOB. This is a subnode of the host node for the host where the VOB storage directory resides.

  2. Click Action > Properties. In the Properties of VOB dialog box, click the Lock tab.

From a Windows host, you can lock or unlock a VOB using the Windows Explorer shortcut menu for the VOB. Click ClearCase > Properties of VOB and click the Lock tab. On the command line, use cleartool lock and unlock:

cleartool lock vob:/flex
Locked versioned object base "/net/pluto/vobstore/flex.vbs".

<perform backup>

cleartool unlock vob:/flex
Unlocked versioned object base "/net/pluto/vobstore/flex.vbs".

Partial Backups

If you use a file-oriented backup program, you may want to exclude some subdirectories within the VOB storage directory to save time. Use the guidelines in Table 3 to determine the relative importance of the various directories.

Table 3 Importance of VOB Directories in Partial Backups


VOB Directory

Importance for Backup

Top-level VOB storage directory


Required


VOB database subdirectory


Required


Source storage pools


Required


Cleartext storage pools


Optional


Administrative directory


Important, but not required


Cleartext Pool Backup

Backing up cleartext storage pools is not important, because they are caches that enhance performance. Type managers re-create cleartext data containers as necessary.

If you do not back up cleartext pools, include each pool's roots in the backup-the pool's root directory (c\cdft, for example) and pool_id file, but not its subdirectories. Doing so prevents pool root check failure at restore time (see also Database or Storage Pool Inconsistencies) and possible cleartext construction errors in the restored VOB.

Administrative Directory Backup

The admin directory contains data on how much disk space has been used by the VOB and its derived objects. The ClearCase LT scheduler runs periodic jobs that collect data on disk space use and store it in the admin directory. By default, the scheduler stores data for the previous 30 days. This historical data cannot be re-created. If the data is important to you, back up the admin directory.

Incremental Backups of a VOB Storage Directory

Using a base-plus-incremental scheme to restore a VOB storage directory typically restores too much data. Depending on your particular VOB and disk, this data may fill up the disk.

ClearCase LT stores version data in delta format (for example, the container of a text_file element). Instead of modifying an existing data container when a new version of an element is checked in, ClearCase LT creates a new container at a different pathname within the source storage pool. (It then deletes the old container.)

An example demonstrates how this storage strategy works with an incremental backup scheme. Suppose that one or more new versions of a particular element are created each day for a week. Each day's incremental backup picks up a different source data container for that element. If a crash occurs on the ClearCase LT server at the end of the week, restoring the VOB places all those source data containers in the source storage pool, even though only one of them (the most recent) corresponds to the current state of the VOB database. Also, checkvob reports large numbers of unreferenced data containers when it runs at VOB restore time. (See the checkvob reference page for details.)

Given this situation, we recommend that you perform only a few incremental backups on a VOB storage directory before the next full backup. This practice minimizes the extra data involved in a base-plus-incremental restoration of the VOB. Run checkvob to detect and clean up the extra debris containers.