.NO PERIOD .PAGE SIZE 58,70 .LEFT MARGIN 4 .RIGHT MARGIN 70 .RIGHT;VAX/VMS .RIGHT;Disk#Backups .B 3.C;Software Documentation Memo No_. 52.1 .B.C;^&Public&#Disk&#Backups&#with&#the&#VMS&#BACKUP&#Utility\& .B.C;Frank J. Nagy .FLAGS SUBSTITUTE .B.C;$$Month#$$Day,#$$Year .NO FLAGS SUBSTITUTE .B.PERIOD.FLAG BREAK .STYLE HEADERS 6,0,7 .HL1 Introduction .BR.P; Before the VMS V2.3 maintenance update, the only program available for saving the public (both system and user) disks was the DSC2 utility. However, using DSC2 required the system to be shutdown or the user disk to be dismounted. With VMS V2.3, the VMS BACKUP utility was made available. BACKUP provides a much better utility to backup and restore the disks than DSC2. Some of BACKUP's advantages over DSC2 are: .LIST ,"-" .LE;Able to perform the file saves online (no need to stop timesharing). .LE;Able to exclude selected files from being saved so that temporary or known active files need not be saved. In the case of the system disk, the paging and swapping files need not be saved leading to a vast reduction in the required amount of tape. .LE;More efficient use of tape by using a large physical block size on tape. .LE;Better detection and recovery from tape errors. .LE;Able to do selective restore of particular files from tape (without having to copy the entire tape set to a scratch disk to restore a single file). .LE;Able to perform incremental saves of recently change files. .END LIST With the release of VMS V3.0, BACKUP (and some cooperative aspects of the Files-11 file system) was enhanced considerably to the point where DSC2 is no longer used at all. In fact DEC plans to drop support of DSC2 with release of VMS V4.0 (sometime next year?). BACKUP is used on the ACNET systems (with the /IGNORE=|INTERLOCK qualifier) to save the public disks without stopping normal timesharing or control system operations. .BR.P;VMS BACKUP is useable as a DCL command, it is described in the ^&VAX/VMS Utilities Reference Manual\&. In order to simplify and control the normal activities of preparing backups of the public disks on the ACNET VAX's, a set of command procedures was created which internally use the VMS BACKUP command to perform the disk saves. A different form of the BACKUP command was then created for the OPERATOR turnkey account (see Software Documentation Memo No_. 44.1) to use these command procedures. .HL1 Full Disk Backup .BR.P;A full disk backup of all the Development System disks is done on a weekly basis. Each full disk backup saves all the files on a particular disk. Each disk volume has two sets of tapes to be used for the full disk backup (alternating between the sets). For each file saved by BACKUP, the date and time are recorded in the on-|disk file header in the field reserved for the date and time the file was last saved. .BR.P; A similar full disk backup is done daily for the Operational System disks, except that the Operational backups are done disk-|to-|disk rather than disk-|to-|tape since the Operational System uses removeable media disk drives for its system and user disks. These backup disks permit the Operational System to be quickly brought back into operation following the failure of a disk drive or the crashing of a disk pack. .BR.P;An online full disk backup is requested by using the operator command BACKUP. The format of the command for a full disk backup is: .B.I+10;^&OPR>\&BACKUP/FULL disk-set .B;where the parameter (disk-set) identifies which disk volumes are to be saved. If the parameter is not given, the disk-set will be prompted for. The recognized disk sets are: .B.LM+14.TAB STOPS 17 .BR.I-9;ALL backup all the disks (both system and user). .BR.I-9;SYSTEM backup just the system disk. .BR.I-9;USER1 backup just the first user disk (given by the logical name USR$DISK1 on the Development System and the name OP$USR1 on the Operational System). .BR.I-9;USERn backup just the nth user disk (given by the logical name USR$DISKn on the Development System and the name OP$USRn on the Operational System). .BR.I-9;USERS backup all user disks, but not the system disk. .B.LM-14 The OPERATOR BACKUP command qualifiers /DISK and /TAPE determine if the backup output media is to be a disk pack or magnetic tape. The /DISK qualifier may currently only be used on the Operational System (where it is the default). The /TAPE qualifier is the default for the Development System). .BR.P; When multiple disk volumes are specified by the disk-set parameter of the BACKUP operator command (see above), the files on each disk volume are saved by separate BACKUP utility operations. Thus the command .B.I+10;BACKUP/FULL USERS .B;is equivalent to the series of commands .B.I+10;BACKUP/FULL USER1 .BR.I+10;BACKUP/FULL USER2 .BR.I+10;... .BR.I+10;BACKUP/FULL USERn .B;in its action. If ALL is specified as the disk-set parameter, then the command is equivalent to multiple BACKUP commands, the first specifing the SYSTEM disk and the rest the user disks. .HL2 Disk-to-Tape Backups .BR.P; The qualifier /ONETAPE may be used with the BACKUP/FULL/TAPE command If /ONETAPE is not used, the command procedure will attempt to allocate and use two magtape drives (if both tape drives are available). The /ONETAPE qualifier is used to force the use of only a single magtape drive for the save operation (leaving the other available for users). The error message: .B;%ONLBAKFUL-F-NOTAPES, all tape drives are currently in use. .B;will result if no free tape drives are available. The BACKUP command should be retried after the current users are finished with the tape drives. .BR.P; After allocating the tape drive(s), the command procedure will ask for the first tape(s) to be mounted. BACKUP will, when using two tape drives, automatically switch from one tape drive to the other when finished with the tape mounted on the first drive. The command procedure will wait for you to reply to a prompt to indicate that the tapes have been mounted and that the backup operation can proceed: .B.I+10;Ready to proceed [type Y or YES]? .B If the answer to the prompt is Y (or YES) then the procedure will begin the save operation. If the answer is EXIT then the procedure will exit back to the OPERATOR command prompt or to the next disk-|set save operation. Any other answer will cause the procedure to respond with the same prompt. .BR.P;The backup operation will proceed automatically after the tapes are mounted. The files will be saved onto the tape, the tape will be rewound, and then a verification pass will be made to compare the tape contents to the disk contents. BACKUP will switch to the second tape (if needed) after the verification pass on the first tape is completed. If only a single tape drive is being used, BACKUP will prompt you to mount the next reel of tape (if needed) with the messages: .B .BR;%BACKUP-I-RESUME, resuming operation on volume 'n' .BR;%BACKUP-I-READYWRITE, mount volume number 'n' on 'dv' for writing .BR;Press return when ready: .B;which specify the tape volume number (n) and the magtape drive (dv) on which it is to be mounted. The same messages will be used if two tape drives are being used and the third tape (for instance) is not mounted when required by BACKUP. BACKUP will output the "%BACKUP-|I-|RESUME" message even if the next reel is already mounted and requires no operator intervention. The completion of the BACKUP operation for a particular volume is signalled by: .B.I+10;Backup of 'volume' has been completed. .B;If multiple disk-sets are being saved this will be followed by a request for the first tape volume of the next disk-|set. .HL3 Tape Volume Labels .BR.P;The tape volume labels for the full backup tapes (first tape in a tape set) are FBSYST, FBUSR1, and FBUSR2 for the Development system and user disks respectively. The equivalent tape volume labels for the Operational system and user disks are OPSYST and OPUSR1 (currently). Additional tape volumes in a tape set have labels given by replacing the last two characters of the above names by 02, 03, and so forth. .HL3 Tape Error Messages from VMS BACKUP .BR.P; The %BACKUP-F-|WRITENABLE error indicates that the tape was mounted without a write-|enable ring inserted; just correct the problem and retry the BACKUP command. Similarly, the fatal error %BACKUP-F-|LABELERR indicates that an I/O error occurred during the tape label processing. In such a case, a different tape should be used when the command is retried as the original tape probably has a bad spot at the start. The %BACKUP-W-|SOFTWERRS message issued at the completion of the writing of a tape volume provides a count of "soft" write errors that occurred. If this count becomes too large (greater than 25 or so), the tape should be replaced before the tape set is reused for another backup. .HL2 Disk-to-Disk Backups .BR.P; The disk-to-disk backups proceed in a fashion similar to the disk-|to-|tape backups discussed above. The operator is informed which disk volume is being saved and onto which disk drive the backup disk pack should be mounted. Since only RM03 drives have removeable disk packs (in the ACNET system), the message: .B;%ONLBAKDSK-F-NODRIVES, no disk drives of required type are available .B;will result if a free drive cannot be found. If a free drive is found but not available for usage (has been marked /NOAVAILABLE, see the OPERATOR command DEVICE in Software Documentation Memo 44.1), then the message printed is: .B;%ONLBAKDSK-F-DRVNOTAVL, disk drive for backup not available .B;Once a drive has been found the procedure prints a message requesting the backup volume be mounted and then prints the prompt: .B.I+10;Ready to proceed [type Y or YES]? .B If the answer to the prompt is Y (or YES) then the procedure will begin the save operation. If the answer is EXIT then the procedure will exit back to the OPERATOR command prompt or to the next disk-|set save operation. Any other answer will cause the procedure to respond with the same prompt. The save operation then proceeds very much as for disk-|to-|tape backups (except for the need to mount additional reels of tape) until completion as signalled by a completion message as show above. .HL2 VMS BACKUP Verification Errors .BR.P;BACKUP will indicate the start of the verify pass on a tape with the STARTVERIFY message: .B;%BACKUP-I-STARTVERIFY, starting verification pass .B;Files copied in a disk-to-|disk operation are verified one-|by-|one after each is copied. Some errors will occur because the BACKUP operation is done online and users may create, modify, or delete files while BACKUP is running. Some of these type of errors are %BACKUP-E-|CONTINUE, %BACKUP-E-|EOFMISMATCH, %BACKUP-E-|FIDERROR, %BACKUP-E-|OPENDIR, and %BACKUP-E-|VERIFYERR and can usually be ignored as the files affected will be saved by the next incremental backup (see below). .HL2 Tape Saveset Names .BR.P; Each full backup tape set will contain one BACKUP saveset whose name is given by the volume name of the system disk (currently DVSYSRL3.BCK for the Development system disk) or a modified form of the logical name for the user disk device (i.e., currently USRDISK1.BCK and USRDISK2.BCK for the Development user disks). The Operational system disk saveset is named OPSYSRL3.BCK and the user disk saveset is named OPUSR1.BCK. As more user disks are added to the Development and Operational systems, the same progression of names will be retained (USRDISK3, USRDISK4, .._. for the Development system and OPUSR2, OPUSR3, .._. for the Operational system). .HL1 Incremental Disk-to-Tape Backup .BR.P;An incremental disk backup of the Development system disks is done on a daily basis. This type of backup will save on tape copies of those files which have been created or modified since the date of their last backup. Each full or daily incremental backup operation records the current date and time in the on-|disk file header of each file that has been saved. The use of the incremental backup insures that a relatively recent (within a day) copy of each file is saved without requiring a large amount of time to generate disk backups. .BR.P;Many of the comments about the full disk backup command procedures also apply to the incremental backup command procedures. The operator command to start an incremental backup is: .B.I+10;^&OPR>\&BACKUP/INCREMENTAL .B;with no parameters. The command procedure will allocate and use only a single tape drive since only a single tape should be required for the incremental backup of all the disks. Files from the system disk and all user disks are saved on the same tape in separate BACKUP savesets. The names of the savesets are the same as those used for the full backup tape savesets (see above). .BR.P;The command procedure will ask you the following question before requesting the mounting of the tape: .B.I+10;Is this a normal daily incremental backup [Y/N]? .B;If you are doing the normal daily incremental backup answer this question with "Y" or "YES" so that the day code (ddd) will be set to the first three letters of the day of the week ("MON", "TUE", "WED", "THU", "FRI", "SAT", or "SUN"). If you answer "N" or "NO", the assumption is made that a special incremental save is being performed (i.e., before a power outage) and the day code is set to "SPC". The tape volume label for the Development System incremental save is formed from the characters "IS" (for Incremental Save) and the day code. An incremental save of the Operational System replaces the "IS" in the tape volume label with "OS". For normal daily backups, the tape volume labels are of the form "ISddd"; for special incremental backups, the tape volume label is given by "ISSPC". Note that a special incremental save will not change the backup date and time in the file headers so that the same files will be saved by the next daily incremental backup. .BR.P;The command procedure will ask that you mount a particular save tape volume on the selected magtape drive. The command procedure will continue with the operation after you reply to a prompt that the tape is mounted on the drive.: .B.I+10;Ready to proceed [type Y or YES]? .B If the answer to the prompt is Y (or YES) then the procedure will begin the save operation. If the answer is EXIT then the procedure will exit back to the OPERATOR command prompt or to the next disk-|set save operation. Any other answer will cause the procedure to respond with the same prompt. After the save operation is completed the message: .B.I+5;Finished with incremental backup tape on 'device' .B;is printed on the system console. The incremental backup operation is then complete. .HL2 Excluded Files .BR.P;Various files are excluded from incremental backups (full backups use the /IMAGE qualifier of the VMS BACKUP command). Some of these files are excluded because the files are always open and active when the system is running (the error log file). Other files are not saved because there is no point in saving those files (the paging and swapping files which have had a "SET FILE/NOBACKUP" done on them). Lastly, some files are not saved because they are directory entries that point to files that are also entered in some other directory ([RSXLIB], [SYSLIB] and [1,1] for example). .BR.P;The following files are excluded from incremental backup saves for all disks and all directories: .B.LM+20.TAB STOPS 23 .I-12;*.LOG assumed to be log listings for batch jobs and forked command lines. These are assumed to be actively open for output or left on the disk by a batch job that was setup to not generate any paper printout. .B.I-12;*.TM% assumed to be temporary files usually with file types *.TMP (general temporary file) or SOS%%%.TM1 (SOS editor temporary file). .B.I-12;MAP.DIF assumed to be a temporary file used by the DIFFERENCES command. .B.LM-20 In addition, all files with file type .SYS are not saved from the MFD (directory [0,0]). This is done to prevent the index file (INDEXF.SYS) from generating lots of verification errors because the /RECORD qualifier of the BACKUP utility caused the file headers (in the index file) to be changed. Also, the bad block files (BADBLK.SYS and BADLOG.SYS) in the MFD are never saved. .BR.P;On the user disks, no files in the directories [1,1] and [SYSLIB] are saved. These directories are assumed to be entries in the MFD that point to some other directory. Currently this is only effective for [RSXLIB] on USR$DISK1 on the Development System. Files in [RSXLIB] (and its subdirectories) will only be saved once and will be marked as coming from [RSXLIB]. .BR.P;On the system disk several more directories are excluded from the save since they are just MFD entries that point to another directory. Included in this list are [SYSMAINT]*.* and [SYS%.00%00%]*.*. In addition, several additional files are excluded from the system disk saves either because they are always open for writing or because they need not be saved. The system error log file, ERRLOG.SYS, in [SYS%.SYSERR] is excluded from the incremental save because it is open for writing. The list of excluded files may be modified in the future as more experience is gained with the BACKUP utility and the incremental backup ability. .HL1 Default Backup Command .BR.P; The normal daily backup operation is invoked by the OPERATOR command: .B.I+10;^&OPR>\&BACKUP .B;This becomes a "BACKUP/INCREMENT" OPERATOR command on the Development System and a "BACKUP/FULL/DISK" on the Operational System. .HL1 Backup Journals .BR.P; The list of files saved onto a tape is added to BACKUP journal files stored under logical name SYS$BACKUPS. This is currently done only for the Development System (on a regular basis) as the disk-|to-|disk saves for the Operational System are not journalled (the output disk volume is essentially an exact replica of the original). The journals permit one to locate a particular file in a collection of full and incremental tape volumes. This is very helpful when trying to locate a particular file to restore it (saves searching the tapes themselves). .BR.P;The file names of the journal files are the same as the tape save set names (see above). The file types are the VMS BACKUP defaults of .BJL. The journal files may be examined by doing: .B.I+10;BACKUP/LIST/JOURNAL=SYS$BACKUPS:filename .B;where the VMS (not the OPERATOR) BACKUP command is used. Additionally, a command procedure has been written to simplify finding a file or set of files in the current save tapes for a disk: .B.I+10;@SYS$MGR_UTIL:FNDSAVFIL disk select .B;where the disk parameter specifies which disk using the "SYSTEM" keyword for the system disk and "USERn" for a user disk (alternatively, the user disk logical name, such as USR$DISKn, may be used). The select parameter is a list of one or more file and directory specifications (separated by commas if more than one specification) to be searched for in the journal file (the select parameter is used to form the /SELECT option of VMS BACKUP). Future enhancements will probably include the creation of an OPERATOR RESTORE command to restore single files (or small sets of files) from tape. .TEST PAGE 20.B 5.TAB STOPS 20 ^&Distribution\& .B.NO PERIOD ##Normal .BR;##Operations Group .BR;##E. Anderson .BR;##B. C. Brown .BR;##K. Eng MS 120 .BR;##L. Klein .BR;##F. Mehring .BR;##D. Ritchie MS 120 .BR;##D. Quarrie MS 223 .BR;##K. Schuh .BR;##J. Tinsley .BR;##file .B4 fjn: USR$DISK1:[NAGY.DOC]DOBACKUPS.RNO