skip book previous and next navigation links
go up to top of book: HP OpenVMS System Manager's Manual, Volume 1:... HP OpenVMS System Manager's Manual, Volume 1:...
go to beginning of chapter: Using BACKUP Using BACKUP
go to previous page: Backing Up User Disks Backing Up User Disks
go to next page: Backing Up and Restoring the System DiskBacking Up and Restoring the System Disk
end of book navigation links

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. Restoring Image Backups describes the process for restoring a disk when the most recent backup was an image backup. Restoring Incremental Backups describes the process for restoring a disk when one or more incremental backups were performed since the most recent image backup.

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 Performing Image Backups to Tape).

How to Perform This Task

To restore an image backup, use the following procedure.


CautionWhen 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 Restoring Files and Directories.

  1. Mount the disk to which you will restore the files, using the MOUNT/FOREIGN command as described in Mounting a Volume.
  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:
  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-deviceIf 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:

$ MOUNT/FOREIGN DUA2: [1] 
%MOUNT-I-MOUNTED, DISK1 mounted on _DUA2:
$ BACKUP/IMAGE  MIA1:FULL_BACKUP.SAV/REWIND  DUA2: [2] 
$ DISMOUNT/NOUNLOAD  DUA2: [3] 
In this example, the individual command lines perform the following actions:
  1. Mount the disk DUA2. The files will be restored to this disk.
  2. Initialize DUA2:, 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 DUA2. BACKUP restores the files contiguously on DUA2:, 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.

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 Accessing Files in Deep Directory Structures.

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 Mounting a Volume 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:
  4. Enter the BACKUP command using the following syntax:BACKUP/IMAGE device:save-set-specifier[/SAVE_SET] output-specifierThe /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-labelThe 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-specifierRemember 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:

$ 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.

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.


NoteRenaming 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.

Restoring Volume Shadow Sets  

Because of the way volume shadowing duplicates data on each disk in the shadow set, there are special considerations for restoring a shadow set. To restore a shadow set, refer to Volume Shadowing for OpenVMS .


NoteBecause the BACKUP output device (the shadow set) must be mounted using the /FOREIGN qualifier, HP does not support a restore operation from an image save set to a virtual unit.


go to previous page: Backing Up User Disks Backing Up User Disks
go to next page: Backing Up and Restoring the System DiskBacking Up and Restoring the System Disk