Previous | Contents | Index |
Periodic backups can produce more than one copy of a particular file and version number. When you are restoring a file, you will usually want to restore the most recent backup of the file, but you are not restricted to that copy.
For example, a user wants to check all the backups available for her file SALES.DAT. She sees the following display when she types:
$ VAULT/DATE=BACKUP/COMMENT SALES.DAT Vault directory DISK$SALES0: [HOSKINS.SALES] SALES.DAT;31 25-FEB-1996 18:34 Moved to archives SALES.DAT;30 22-JAN-1996 16:47 Full backup SALES.DAT;29 19-JAN-1996 18:21 Incremental backup SALES.DAT;29 18-JAN-1996 18:03 Incremental backup Total of 4 files |
A user has displayed the backup dates and the comment field so she can
deduce a lot about the history of her file from this display. She knows
that the file was modified on January 18 and 19, because the
incremental backups copied the file to the backup tape on both dates.
It was not modified again before the full backup copied the file to
tape on January 22. Therefore, the most current version of the file is
the full backup from January 22. If she suspects that the data was
corrupted during the day on January 19, she can restore from the
incremental backup on the 18th, instead.
13.3 Restoring files from a backup
Once you have located the file you want to restore, you can use the VAULT/RESTORE command to generate a request to restore it. Your request for a file restoration activates the job VAULT_RESTORE that is defined in the BCKMGR system. It will restore the file to the same directory and file name from which it was backed up, unless you use the qualifier /TO to request another location.
The command format is:
$ VAULT/RESTORE/QUALIFIERS FILE_NAME |
You can use VMS wildcards in the file specification to restore more than one file per request. VAULT/RESTORE will only restore the file if you owned the original.
The general qualifiers /CONFIRM and /LOG can be applied, as well as the search qualifiers /EXCLUDE, /SINCE and /BEFORE to the VAULT command as discussed in Section 13.2.2. The types of dates that can be specified with the search qualifiers are limited to /CREATED, /MODIFIED and /EXPIRED.
It is also possible to restore a file to a location other than the original by using the qualifier:
/TO=file_specification |
For example, if a user wants to restore the file JAN_SALES.DAT;3 to the directory [SALES.FIRSTQ], instead of the original directory it was backed up from, she enters the following command:
$ VAULT/RESTORE/CONFIRM/TO=[SALES.FIRSTQ] JAN_SALES.DAT;3 |
She then gets a message from the system:
Restoring DISK$SALES0:[SALES.FIRSTQ] JAN_SALES.DAT;3 |
If a user wants to restore one version of the file SALES.DAT that she locates using the VAULT/DIRECTORY command: 3
$ VAULT/DATE=BACKUP/COMMENT SALES.DAT Vault directory DISK$SALES0: [JOHNSON.SALES] SALES.DAT;32 28-FEB-1996 18:34 Moved to archives SALES.DAT;32 25-JAN-1996 18:21 Incremental backup SALES.DAT;31 19-JAN-1996 18:03 Incremental backup Total of 3 files |
he enters:
$ VAULT/RESTORE/CONFIRM SALES.DAT |
and the system responds with a question about whether to restore each version:
$ VAULT/RESTORE/CONFIRM SALES.DAT Restore DISK$SALES0: [HOSKINS.SALES] SALES.DAT;31 [Y/N] :N Restore DISK$SALES0: [HOSKINS.SALES] SALES.DAT;32 [Y/N] :Y Restore DISK$SALES0: [HOSKINS.SALES] SALES.DAT;32 [Y/N] :N |
3 The VAULT/RESTORE command generates a restore request which is saved up. A batch job VAULT_RESTORE is then triggered which in turn examines these packets and performs the needed actions. The MANAGER can change when this job is run. |
Frequently a user will discover that in a certain directory he has
accidentally deleted a file or that the file has been off-loaded to
tape. Below is an illustration of what would be required to restore a
particular file. All these operations can easily be performed by the
user without compromising the system security or obtaining access to
the system backups.
13.4.1 Locate the file
First, locate the file by using the VAULT command. The user himself can issue this command to determine what files are contained in the backup system on his behalf. All current default device and directory specifications are processed in the same fashion as the VMS DIRECTORY command. A typical VAULT command to list a directory is illustrated below:
$ VAULT SYS$LOGIN:* Vault directory DBA0:[SMITH] LOGIN.COM;1 BATCH23.LOG;1 BATCH23.LOG;2 TEST.COM;1 MAIL.MAI;2 Total of 5 files $ VAULT Vault directory DBA0:[SMITH.DATA.TEST1] PLOT.FOR;1 PLOT.FOR;2 PLOT.FOR;3 TEST3.DAT;1 TESTE.DAT;2 UX22.DAT;1 UX22.DAT;1 UX33.DAT;1 ZZZZTEST.DAT;1 Total of 9 files $ VAULT/DATE/COMMENT/SINCE=1-JUL-1996 * Vault directory DBA0:[SMITH.DATA.TEST1] PLOT.FOR;1 26-AUG-1996 11:18 Incremental backup PLOT.FOR;2 27-AUG-1996 12:00 Incremental backup PLOT.FOR;2 1-OCT-1996 14:00 Moved to archives TEST3.DAT;1 10-AUG-1996 00:10 Full system backup TEST3.DAT;2 11-AUG-1996 13:00 Incremental backup |
13.4.2 Restore the file
To restore a particular file, the user can then issue the following
type of command using the /RESTORE qualifier. This generates a request
to the system. The system then generates a job with the needed
privileges to access the required backup medium. Some typical commands
to request a file to be restored are listed below:
$ VAULT/RESTORE TEST3.DAT;1 $ VAULT/RESTORE/CONFIRM PLOT.FOR Restore DBA0:[SMITH.DATA.TEST1]PLOT.FOR;2 [Y/N] :N Restore DBA0:[SMITH.DATA.TEST1]PLOT.FOR;2 [Y/N] :Y Restore DBA0:[SMITH.DATA.TEST1]PLOT.FOR;3 [Y/N] :N $ VAULT/RESTORE/LOG SYS$MANAGER:ACCOUNTNG.DAT;3 Restoring DBA0:[SYS0.SYSMGR]ACCOUNTNG.DAT;3 |
13.4.3 File attributes
The internal structure of the VAULT database closely parallels the VMS
DIRECTORY structure. The full file attributes are kept and special
linkages are created for directory file pointers. The overall design of
VAULT is to minimize disk usage and maximize execution speed.
$ VAULT/FULL PLOT.FOR;1 DBA0:[SMITH.DATA.TEST1]PLOT.FOR;1 Size: 130 Created: 1-AUG-1996 11:18 Owner: [ISE,SMITH] Revised: 29-AUG-1996 08:30 Protection: Expires: (not set) (S:RWED,O:RWED,G,W) Backup: 1-AUG-1996 14:34 Record size: 80 Vaulted: 30-AUG-1996 17:01 Record format: Sequential, variable size Note: Incremental backup Location: 1205(DBA0.BCK/2/1206) |
13.5 Restore via search in DCL
The Restore via search facility allows the OPERATOR to create a
detailed search criteria to locate needed files. By selecting such
specific criteria as files names, saveset names and backup job, it is
possible to locate files on any volume.
13.5.1 Invoking Restore via search
In order to invoke the Restore via search procedure in DCL, enter the following at the command prompt:
The prompts can be responded to according to the descriptions in Table 13-3.
Field | Description |
---|---|
Job names | Select a backup job name from which to perform the search. |
Saveset names | Select a particular saveset that is used to back up the desired files. |
Backed up after | Selects only files backed up after this date. |
Backed up before | Selectes only files backed up before this date. |
Restore from files | Selects files to be restored from the job and/or savesets selected. |
After the search is complete, respond to the prompt to designate
whether or not you want to restore individual files
13.6 Full disk recovery in DCL
This section describes the use of the the DCL BCKMGR_HISTORY procedure to build a recovery job and perform a full disk recovery. The basic procedure is to first locate the correct set of tapes to use, review a report listing those tapes and generate the job command list to reconstruct the disk.
The following procedures are self contained and will work whether or not the MEDIA Librarian is operational. |
It is possible to perform all the operations detailed in the previous section on MCL disk restoration, using the DCL MEDIA_LIBRARY:BCKMGR_HISTORY command procedure. These procedures all perform key operations on the BCKMGR history file. Entries in this file are used to determine which disks were backed up, to which tape using what saveset name. This information is then used to generate a job command list in order to reconstruct the disk.
The following steps describe a typical restore procedure using BCKMGR_HISTORY on volume ISE0.
$@MEDIA_LIBRARY:BCKMGR_HISTORY SEARCH ISE0 TODAY |
$@MEDIA_LIBRARY:BCKMGR_HISTORY REPORT RESTORE_ISE0.LIS |
$PRINT RESTORE_ISE0.LIS BCKMGR V4.0 Disk reconstruction report for source volume ISE0 Restore up to date for reconstruction is 5-JAN-1996 00:00:00.00 Report generated on 5-JAN-1996 10:27:22.70 Type Done on Saveset Job name Volume set F 4-JAN-1996 11:52 ISE0_1.BCK ISE0_BACKUP 780,787,788 |
$@MEDIA_LIBRARY:BCKMGR_HISTORY RESTORE_COM RESTORE_ISE0.COM |
$SUBMIT RESTORE_ISE0.COM /PARAMETER="$1$DUA0:" |
After issuing this command the restoration will be submitted to the queue, and recovery will begin.
The BCKMGR history file may be purged of old records using the argument PURGE. The following example deletes all records added prior to December 1, 1996:
$@MEDIA_LIBRARY:BCKMGR_HISTORY PURGE 1-DEC-1996 |
The history data file BCKMGR_HISTORY.DAT, located in the MEDIA_LIBRARY directory, is the source for BCKMGR_HISTORY procedures. The file is in sequential text format and may be processed by an editor or accessed by a database such as Datatrieve. The record layout of this file is contained in BCKMGR_BHTDEF.DTR, also located in the MEDIA_LIBRARY directory.
Previous | Next | Contents | Index |