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).
To restore an image backup, use the following procedure.
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
Restoring Files and Directories.
Mount the disk
to which you will restore the files, using the MOUNT/FOREIGN command
as described in
Mounting a Volume.
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.
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.
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 ).
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.
Use the /NOUNLOAD qualifier to dismount the disk
onto which you just restored the files.
In this example, the individual command lines perform the
following actions:
Mount the disk DUA2. The files will
be restored to this disk.
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.
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.
To restore incremental backups, use the following procedure
(note that the first few steps are similar to the procedure for
restoring an image backup):
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.)
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.
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.
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 ).
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.
Use the /NOUNLOAD qualifier to dismount the disk
onto which you have just restored the files from the image backup.
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.
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.
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.
In this example, the individual command lines perform the
following steps:
Mount the disk DUA2: with the /FOREIGN
qualifier. The files will be restored to this disk.
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.
Logically dismount the disk DUA2.
Remount the disk DUA2:, this time as a Files-11
volume.
Restore the most recent incremental backup.
Restore the next incremental backup.
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.
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.
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
.
Because 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.