Document revision date: 30 March 2001

## OpenVMS System Manager's Manual

Previous | Contents | Index

#### 11.15.7.3 Using an Interactive Command Procedure for Backups

You can use the following command procedure to interactively back up a disk to a magnetic tape.

How to Perform This Task

To use the procedure, perform the following steps:

1. Create the command procedure in your directory:

       $ ! Command procedure DAILYBACK.COM
       $ !
       $ ! Execute this command procedure interactively
       $ !  by entering the command @[directory]DAILYBACK
       $ !  at the DCL prompt.
       $ !
       $ ! The BACKUP command in this procedure contains the
       $ !  output save-set qualifier /REWIND.  Therefore, this
       $ !  command procedure always initializes the output tape.
       $ !
       $ ON ERROR THEN GOTO FAILURE
       $ INQUIRE DRIVE "Enter the drive name (without a colon)"
       $ ALLOCATE 'DRIVE'
       $ INQUIRE SAVESET_SPEC "Enter the save-set specifier"
       $ INQUIRE LBL "Enter the tape label"
       $ INQUIRE EXP "Enter the tape expiration date"
       $ BACKUP/NOASSIST/RECORD/IGNORE=INTERLOCK/SINCE=BACKUP -
         [...] 'DRIVE':'SAVESET_SPEC'/REWIND/LABEL='LBL'/TAPE_EXPIRATION='EXP'
       $ DISMOUNT 'DRIVE'
       $ EXIT
       $!
       $FAILURE:
       $  WRITE SYS$OUTPUT "---> Backup failed"
       $  WRITE SYS$OUTPUT ""
       $  DISMOUNT 'DRIVE'
       $  EXIT

2. Run the procedure and enter the drive, save set, tape label, and tape expiration information.
3. After the specified tape drive is allocated, BACKUP searches the tape's volume header record for a volume label and compares the label you specified with the /LABEL qualifier. If the volume header record contains no volume label, BACKUP writes the label and expiration date you specified to the volume header record and initializes the tape. Otherwise, BACKUP compares the tape's volume label with the label you specified and ensures that the tape is expired.
   If the tape is not expired or the label does not match, the command procedure exits. If the tape is expired and the label matches, BACKUP writes the expiration date you specified to the volume header record and initializes the tape. After initializing the tape, BACKUP saves all files in the current default directory tree that have been created or modified since the last save operation to a save set with the name you specified.

### 11.15.8 Backing Up Volume Shadow Sets

Volume shadowing maintains multiple copies of the same data on two or more disk volumes. If you use volume shadowing on your system, you can form a shadow set by uniting individual disk volumes (shadow set members). Volume shadowing duplicates data on each member of the shadow set. Per-disk licensing is available for each disk you will be including in a shadow set. This option is effective in a cluster where you intend to shadow only a small number of disks. However, if you have larger systems with many more disks to shadow, traditional capacity (per-CPU) licenses may be more appropriate.

Limits on the numbers of disks allowed in shadow sets are shown in Table 11-7.

Table 11-7 Number of Shadow Sets Supported
Type of Shadow Set | Sets Supported
--- | ---
Single member | Unlimited sets
Multimember | Total of 400 disks in two- and three-member sets, or both

These limits apply per cluster. For example, 400 total disks could be configured into 200 two-member shadow sets or into 133 three-member shadow sets per cluster. If single, two-member, and three-member shadow sets are all present on a single cluster, then a maximum of 400 disks may be contained in the two- and three-member shadow sets.

You can use the firmware implementation of RAID level 1 (shadowing) to create shadow sets using the SCSI (Small Computer Systems Interface) disks attached locally to a single SWXCR-xx controller. The StorageWorks RAID Array 210 Subsystem (SWXCR-EA or SWXCR-EB EISA Backplane RAID controllers) and the StorageWorks PCI Backplane RAID controller (SWXCR-PA or SWXCR-PB) have their own firmware implementations of RAID, levels 0, 1, and 5.

SCSI disks connected to these controllers can also be included in shadow sets created using host-based volume shadowing for OpenVMS. For example, with host-based volume shadowing, you can create a RAID1 shadow set containing two like disks, each of which is attached to a separate SWXCR-xx RAID controller located within a cluster. SCSI disks can be configured as shadow sets when attached to systems running volume shadowing for OpenVMS.

For directly connected SCSI devices that have been powered down or do not answer to polling, the elapsed time before a device is removed from a shadow set approaches one minute. In all other situations, the elapsed time closely approximates the number of seconds specified in the SHADOW_MBR_TMO parameter.

Volume shadowing checks for geometries and maximum logical block numbers (LBNs) on devices. This enables devices such as the RZ28 and the RZ28B to operate in the same shadow set. Even though their device IDs differ, their geometries and maximum LBNs will match when configured on like controllers (two HSJ controllers, for example).

When you create a shadow set, individual users access it as a virtual unit. For example, you could create a virtual unit DSA1 that consists of the disks named DUA1:, DUA2:, and DUA3. Users cannot access the individual shadow set members directly, but can perform operations on the virtual unit (DSA1:).

Because of the way volume shadowing duplicates data on each disk in the shadow set, there are special considerations for backing up a shadow set. One strategy for backing up shadow sets involves using the OpenVMS Backup utility.

Caution Do not attempt to back up a shadow set by dismounting an individual shadow set member or by backing up an active shadow set member. You must dismount the entire shadow set and re-create it less one shadow set member. If you do not follow this restriction, the resultant backup copy may contain inconsistent data.

How to Perform This Task

The proper procedure for using BACKUP to back up a shadow set is described in detail in the Volume Shadowing for OpenVMS manual, and can be summarized as follows.

Note You cannot perform an incremental backup using this procedure because the backup record date is overwritten when you add the disk volume back into the existing shadow set.

1. Make sure that all shadow set members are full members; none of the members should be in a merge or copy state.
2. Dismount the entire shadow set.
3. Re-create the shadow set less one member. The data on the excluded member will mirror the data on the shadow set members.
4. Mount the former shadow set member for the backup.
5. Perform an image backup on the former shadow set member.
6. Dismount the former shadow set member when the backup is complete.
7. Add the shadow set member that you backed up.

#### 11.15.8.1 Mounting a Disk in a Host-Based Shadow Set

To mount a disk in the StorageWorks RAID Array 110 Subsystem in a host-based shadow set, you must use the /OVERRIDE=NO_FORCED_ERROR qualifier with the MOUNT command.

The StorageWorks RAID Array 110 Subsystem does not support the READ/WRITE LONG SCSI commands that are necessary for implementing the FORCED ERROR function in SCSI. Without FORCED ERROR, you must override that check by the shadowing driver.

#### 11.15.8.2 Assisted Merging in Mixed-Architecture Clusters

Assisted merging, also known as minimerge, is disabled if shadow sets are mounted on an OpenVMS Alpha node and also on other types of nodes in the same cluster. To reenable assisted merging, apply the CSCPAT (TIMA) kit to all OpenVMS Cluster nodes mounting the shadow set.

With minimerge disabled, shadowing will continue to function normally. However, a full merge will always be done when a merge operation is required. A full merge takes considerably longer to complete than a minimerge operation; Compaq recommends that you install the CSCPAT (TIMA) kit.

## 11.16 Restoring User Disks

Occasionally you may want to restore the backup copy of an entire disk. For example, if the disk drive fails, you could restore the backup copy to a working disk. By occasionally saving and restoring an image backup, you can also prevent disk fragmentation.

The way in which you restore a disk depends on whether the most recent backup was an image (full) or incremental backup. Section 11.16.1 describes the process for restoring a disk when the most recent backup was an image backup. Section 11.16.2 describes the process for restoring a disk when one or more incremental backups were performed since the most recent image backup.

### 11.16.1 Restoring Image Backups

This section describes how to restore the entire contents of a disk when your most recent backup was an image backup (using the /IMAGE qualifier, as described in Section 11.15.2).

How to Perform This Task

To restore an image backup, use the following procedure.

Caution When you use the /IMAGE qualifier in a restore operation, the disk to which you are restoring the files is initialized. Initializing the disk removes links to the existing files, effectively erasing them. To restore individual files or directories rather than the entire disk, see Section 11.14.

1. Mount the disk to which you will restore the files, using the MOUNT/FOREIGN command as described in Section 11.8.2.
2. Load and mount the volume. If the backup is contained in a Files--11 save set, make sure you mount the volume in the Files--11 format. If the backup is contained in a sequential disk save set, make sure you load the volume and mount it using the MOUNT/FOREIGN command. If the backup copy is on a tape save set, load the first tape.
3. If you do not know the name of the save set, perform one of the following actions:
   - If the save set is on a disk, make sure the disk is mounted in the Files--11 format and use the DIRECTORY command to determine the name of the save set. For example:

         $ DIRECTORY BACKUP_DISK:[BACKUPS]
         Directory SYS$SYSDEVICE:[BACKUPS]

         19APRIL2000.SAV;1

         Total of 1 file.

     The save set is named 19APRIL2000.SAV.
   - If the save set is on magnetic tape, load the tape and then enter the following command, substituting the name of your tape drive for MIA1:

         $ BACKUP/LIST/REWIND MIA1:
         Listing of save set(s)

         Save set:          19APRIL2000.SAV
         Written by:        SYSTEM
         UIC:               [000001,000004]
         Date:              19-APR-2000 22:03:03.63
            .
            .
            .

     The save set is named 19APRIL2000.SAV.
4. To restore the save set, enter the BACKUP command with the /IMAGE qualifier, using the following syntax:

   `BACKUP/IMAGE device:save-set-specifier [/SAVE_SET] output-device`

   If your backup save set is on a disk or diskette, then you must also use the /SAVE_SET qualifier immediately after the save-set specifier (device:save-set-specifier).

5. If your backup save set is on more than one tape, disk, or diskette, BACKUP dismounts and unloads the current volume. Load the next volume when BACKUP prompts for it.
6. Use the /NOUNLOAD qualifier to dismount the disk onto which you just restored the files.

Example

The next example shows how to restore an image backup, using the following assumptions:

- The saved files are contained in a tape save set named FULL_BACKUP.SAV. This save set is the result of an image backup.
- The tape containing the saved copy of the disk contents is loaded on MIA1.
- DRA2: is the device name of the disk to which the files will be restored.

    $ MOUNT/FOREIGN DRA2:(1)
    %MOUNT-I-MOUNTED, DISK1 mounted on _DRA2:
    $ BACKUP/IMAGE  MIA1:FULL_BACKUP.SAV/REWIND  DRA2:(2)
    $ DISMOUNT/NOUNLOAD  DRA2:(3)

In this example, the individual command lines perform the following actions:

1. Mount the disk DRA2. The files will be restored to this disk. The disk must be loaded before it can be mounted.
2. Initialize DRA2:, effectively erasing any previous data on the disk. Restore the directory structure and all the files from the save set FULL_BACKUP.SAV to the disk DRA2. BACKUP restores the files contiguously on DRA2:, eliminating any disk fragmentation on that device.
   The /IMAGE qualifier restores a logical duplicate of the original disk so that the entire directory structure is restored and the files are placed in the proper directories.
3. Dismount the disk.

### 11.16.2 Restoring Incremental Backups

Restoring files after making an image backup and one or more incremental backups is a two-step process. First, restore the most recent image backup. Then, restore each subsequent incremental backup, starting with the most recent.

For the number of directory structure levels you can access see Section 11.14.1.

How to Perform This Task

To restore incremental backups, use the following procedure (note that the first few steps are similar to the procedure for restoring an image backup):

1. Mount the disk to which you will restore the files, using the MOUNT /FOREIGN command. (See Section 11.8.2 for information about the MOUNT command.)
2. Load the tape, disk, or diskette that contains the most recent image backup of the disk. If the backup save set spans more than one volume, load the first volume of the set. If the backup copy is on a disk or diskette, mount the volume.
3. If you do not know the name of the save set, perform one of the following actions:
   - If the save set is on a disk, make sure the disk is mounted and use the DIRECTORY command to determine the name of the save set. For example:

         $ DIRECTORY BACKUP_DISK:[BACKUPS]
         Directory SYS$SYSDEVICE:[BACKUPS]

         19APRIL2000.SAV;1

         Total of 1 file.

     The save set is named 19APRIL2000.SAV.
   - If the save set is on magnetic tape, load the tape and enter the following command, substituting the name of the tape drive you use for MIA0:

         $ BACKUP/LIST/REWIND MIA0:
         Listing of save set(s)

         Save set:          19APRIL2000.SAV
         Written by:        SYSTEM
         UIC:               [000001,000004]
         Date:              19-APR-2000 22:03:03.63
            .
            .
            .

     The save set is named 19APRIL2000.SAV.
4. Enter the BACKUP command using the following syntax:

   `BACKUP/IMAGE device:save-set-specifier[/SAVE_SET] output-specifier`

   The /IMAGE qualifier indicates that you are restoring an image backup. If your backup copy is on a disk or diskette, then you must also use the /SAVE_SET qualifier immediately after the save-set specifier (device:save-set-specifier).

5. If your backup copy is on more than one tape or diskette, load each subsequent tape or diskette when BACKUP prompts for the next volume.
6. Use the /NOUNLOAD qualifier to dismount the disk onto which you have just restored the files from the image backup.
7. Mount the disk that you are restoring as a file-structured volume, using the following syntax:

   `MOUNT device-name: volume-label`

   The parameter device-name is the name of the drive that holds the volume you want to mount. The parameter volume-label is the 1- to 6-character alphanumeric identification you assigned to the volume with the INITIALIZE command.

8. Dismount the media that contained the image backup and mount the tape, disk, or diskette that contains the most recent incremental backup of the disk.
9. Restore your incremental save sets, beginning with the most recent backup. Use the following syntax to restore an incremental backup:

   `BACKUP/INCREMENTAL save-set-specifier[/SAVE_SET] device-specifier`

   Remember that you must use the /SAVE_SET qualifier after the save-set specifier if your backup copies are on a disk or diskette.
   Continue restoring the incremental backups, from the most recent to the oldest, until you have processed all of the incremental backups since the most recent image backup. If the incremental backups are on more than one tape, diskette, or disk, then you must load each one successively when prompted by BACKUP.
   When you have processed the oldest incremental backup, the restore operation is complete.

Example

The next example shows the process of restoring an entire disk after a series of incremental backups, using the following elements and assumptions:

- The save set for the image backup is named WORK_BACKUP.SAV. This save set was created using the BACKUP/IMAGE/RECORD command.
- The save sets for the incremental backups are named as follows:

  > WORK_16_JAN.SAV
  > WORK_17_JAN.SAV
  > WORK_18_JAN.SAV

- Both the image and the incremental backup save sets are on the disk named DUA3:, which is already mounted.
- The disk to which the files will be restored is named DUA2.

    $ MOUNT/FOREIGN DUA2:(1)
    %MOUNT-I-MOUNTED, WORK_B mounted on _DUA2:
    $ BACKUP/IMAGE DUA3:WORK_BACKUP.SAV/SAVE_SET DUA2:(2)
    $ DISMOUNT/NOUNLOAD  DUA2:(3)
    $ MOUNT DUA2: WORK_B (4)
    %MOUNT-I-MOUNTED, WORK_B mounted on _DUA2:
    $ BACKUP/INCREMENTAL  DUA3:WORK_18_JAN.SAV/SAVE_SET  DUA2:(5)
    $ BACKUP/INCREMENTAL  DUA3:WORK_17_JAN.SAV/SAVE_SET  DUA2:(6)
    $ BACKUP/INCREMENTAL  DUA3:WORK_16_JAN.SAV/SAVE_SET  DUA2:(7)

In this example, the individual command lines perform the following steps:

1. Mount the disk DUA2: with the /FOREIGN qualifier. The files will be restored to this disk.
2. Restore the directory structure and all the files from the save set WORK_BACKUP.SAV to the disk DUA2. This was an image backup, so it must be the first save set you restore when you want to restore incremental backup save sets.
3. Logically dismount the disk DUA2.
4. Remount the disk DUA2:, this time as a Files--11 volume.
5. Restore the most recent incremental backup.
6. Restore the next incremental backup.
7. Restore the oldest incremental backup.
   Restoring the incremental backups in reverse chronological order is the most efficient way to restore files. When you have restored the last incremental backup, the restore operation is complete.

#### 11.16.2.1 Restoring to Target Disk Structures

BACKUP examines the target disk and the save-set contents to determine which save-set entries to ignore and which target disk entries to delete. If BACKUP encounters a privilege error when attempting to delete directories or other files from the target disk, BACKUP attempts to change the protection of the files so they can be deleted.

BACKUP detects modified directory files and will subsequently save the contents of the directory and its subdirectories to allow proper restoration of renamed directories.

Note Renaming directories is not recommended. Also, changing security information for a directory changes its modification date. Thus, a directory might appear to be "renamed" and its contents included in incremental save sets if the file protection or security information is changed. The addition of renamed directory contents might increase the size of some incremental save sets.

BACKUP processes the target disk directory structure by directory levels, in alphabetical order. Thus, circumstances can occur that prevent BACKUP from correctly restoring an incremental save set to a target disk. For example, the target disk does not have sufficient space to hold newly "renamed" directories and their contents prior to deleting the original directories and their contents on the target disk.

If incremental restore fails due to insufficient disk space, a possible solution is to apply the incremental save set a second time (before doing anything else). This causes the first incremental restore to continue and delete directories and their contents, making more space available on the target disk. A second solution is to selectively restore files from the save set.

BACKUP attempts to restore alias or synonym file entries in incremental restore operations that do not specify multiple processing of alias or synonym file entries (/NOALIAS). In cases where the alias entry cannot be restored properly, BACKUP issues an error message indicating the alias file entry, its primary file, and a secondary status of the cause of the failure.

If you specify the /LOG qualifier, then BACKUP issues a message upon successful restoration of alias file entries.

If you specify the /VERIFY qualifier, BACKUP attempts alias entry restoration during the verify pass. Otherwise, alias entry restoration is attempted along with the normal file restoration. The reason for this behavior is that BACKUP attempts to restore all primary files before attempting to restore alias entries that will eventually reference those files.

Previous | Next | Contents | Index

| privacy and legal statement |
6017PRO_049.HTML