A BACKUP restore operation takes a save set and restores it
to its original condition. Often a restore operation is the result
of a crisis (you have deleted an important file or a disk has become
corrupted, for example). When you restore files, BACKUP places the
contents of the save set in the location that you specify.
To restore files, use the BACKUP command in the following
format:BACKUP save-set-specifier [/SAVE_SET] /SELECT=[dir...]
output-specifier:[dir...]
Use the /SAVE_SET qualifier if the save set is on a disk or
diskette. The /SELECT qualifier lets you specify the exact file
you want to restore.
If your save set is stored on more than one magnetic tape
or sequential disk volume, it is possible to begin restore and compare
operations with any volume of the save set. However, if you are
restoring a save set with the command qualifier /IMAGE, processing
must begin with the first volume. (An image restore operation restores
all files to a volume or volume set.) If you attempt an image restore
or compare operation and specify a tape that is not the first volume
of the save set, you receive the following message:
%BACKUP-W-NOT1STVOL, tape 'name' is not the start of a save set
You can use the command qualifier /LOG to monitor the files
as they are restored. To restore only a small number of files from
a large save set, press Ctrl/Y to terminate processing once the
files you need have been restored.
If you mistakenly
delete the file USER1:[WORK.SEPT]INVOICES.DAT but it has been backed
up to a save set named NIGHTLY.BCK, you could restore it using the
following command:
You can also use wildcard characters to restore
more than one file. For example:
$BACKUP/LOG_From:MUA0:NIGHTLY.BCK/SELECT=[WORK.SEPT]INVOICES*.*_To:USER1:[WORK.SEPT]INVOICES*.*%BACKUP-S-CREATED, created USER1:[WORK.SEPT]INVOICES_01.TXT;1
%BACKUP-S-CREATED, created USER1:[WORK.SEPT]INVOICES_02.TXT;1
%BACKUP-S-CREATED, created USER1:[WORK.SEPT]INVOICES_03.TXT;1
%BACKUP-S-CREATED, created USER1:[WORK.SEPT]INVOICES_04.TXT;1
%BACKUP-S-CREATED, created USER1:[WORK.SEPT]INVOICES_05.TXT;1
%BACKUP-S-CREATED, created USER1:[WORK.SEPT]INVOICES_06.TXT;1
.
.
.
The /LOG qualifier displays the file specification of the
files that you restored.
The following example restores files from the magnetic
tape save set NOV12SAVE.BCK to subdirectories of the directory [LYKINS]:
$BACKUP TAPE:NOV12SAVE.BCK [LYKINS...]
To restore a specific file from a save set, use
the input save-set qualifier /SELECT. In the following example,
the file STRAT1.DAT in the directory [LYKINS.GLENDO] was deleted
accidentally. The user, who previously saved the file to a save
set named NOV2SAVE.BCK, uses BACKUP to restore the file to the directory.
Next, the user enters the DIRECTORY command to confirm that the
file has been restored to the subdirectory [LYKINS.GLENDO].
$BACKUP_From:MIA0:NOV2SAVE.BCK/SELECT=[LYKINS.GLENDO]STRAT1.DAT;5_To:STRAT1.DAT;5$DIRECTORY STRAT1.DATDirectory [LYKINS.GLENDO]STRAT1.DAT;5Total of 1 file.$
Suppose you deleted the entire [REPORTS] directory,
which previously contained the following subdirectories:
This command restores all the files in the [REPORTS] directory
and the subdirectories ([.INTERNAL], [.PUBLIC], [.SUMMARIES], [.TEST],
and [.WEEKLY]).
To restore all files from a magnetic-tape save set
named NOV12SAVE.BCK to the directory tree from which they were saved,
enter the following command:
$BACKUP TAPE:NOV12SAVE.BCK/REWIND [*...]
The /REWIND qualifier directs BACKUP to rewind the tape to
the beginning-of-tape before beginning the restore operation. This
ensures that the save set will be restored even if it is located
before the current tape position.
Accessing Files in Deep Directory Structures
BACKUP
can access a file in a directory structure that is a maximum of
32 levels deep. BACKUP can also select a file from within a BACKUP
save-set file that was previously in a deep directory (one that
is greater than 8 levels deep). On an ODS-2 disk, however, you can
restore a file from a directory that is a maximum of 8 levels deep.
The following example restores a deep directory structure that is
12 levels deep: