JGDM231 MEMO: TO: Interactive Systems Group FROM: James Downward SUBJECT: Incremental Restore Procedure DATE: 16-NOV-1984 Following last summer's problem restoring the RA81, it seemed that a cataloged procedure which would restore tapes created by INCBACKUP was in order. This memo serves to introduce INCRESTOR which will perform restorations of incremental save sets such that 1. The proper save sets to restore are shown. 2. The proper order for restoring is shown. 3. The files are restored with the proper ownership. 4. A log file of all changes made during a multi-taperestore operation is automatically generated. 5. Either full save set or selected file restorations are possible. 1.0 Using INCRESTOR.COM INCRESTOR.COM resides on SYS$COMFILE and is invoked either by the command $ CMD INCRESTOR or $ @SYS$COMFILE:INCRESTOR 1.1 Using INCRESTOR.COM In Debug Mode For the purposes of developing and testing INCRESTOR.COM, DEBUG mode exists and is invoked by placing the word DEBUG on the command line, ie @SYS$COMFILE:INCRESTOR DEBUG. In debug mode, 1. The interval between messages is 1 second, not 1 minute. 2. System logical names which point to SYS$ANNOUNCE and SYS$WELCOME are not affected so the user logging on does not receive warnings that the restore operation is going on. 3. Warning messages saying to get off the disk are only sent to the issuing terminal, not all users. 4. No disk specific logon messages are displayed. 5. The magtape is not unloaded when the procedure ends. JGDM-231 Page 2 1.2 Restoring Files With INCRESTOR After starting INCRESTOR.COM, you are asked to input your last name. The only place this information is used is that it is inserted into the log file. The reason it is there is so that in the event we have to do multiple tape restore operations on a given disk, we have some of unraveling problems which might occur. INCRESTOR then asks for the device to restore to. This must be one of our disks, DRA0:, DRA1:, DMA1: or DUA0: If the input is not one of these disks, an error message is displayed. Next the tape drive MSA0: is allocated. If for some reason it can not be allocated, error messages explaining why are displayed and INCRESTOR exits. If a previous Incremental or Full backup was done on the disk, INCRESTOR then scans the INCBACKUP log file appropriate for the disk volume selected for restoration and finds the date of the last full backup. This INCBACKUP log file is SYS$SYSDEVICE:[OPERATOR.BACKUP]'disk_name'.BAK where 'disk_name' is the first 9 characters of the VOLUME name with any "$" present converted to 'X's. INCBACKUP then displays the date of the last full backup and prompts for a date to incrementally restore from. The operator is then prompted for the date to incrementally restore from. The default date is taken to be the date of the last full disk backup. Based on this date, the log file kept by INCBACKUP is scanned and only those backups performed which included files modifed after the specified date are displayed. The display of backup sets includes information showing the backup tape name, the backup set name and the range of dates for which INCBACKUP incrementally performed the backup. If no backup states exist, a warning message is displayed to that effect is displayed but the user is still given the opportunity to input a save set name. After the user inputs a BACKUP save set name, those save set names which were previously displayed are checked to see if the input name is amoung them. If the name is not amoung them, a warning message is printed and the user is asked if the restoration should proceed anyway even though the save set name is not one of the cataloged ones. This check is made because if a wrong name is entered for a save set name, BACKUP will search all the way to the end of a tape reel looking for it and this can take considerable time. If one elects to proceed or enters a known save set name, INCRESTOR asks for a file selection string. If a RETURN is entered here, all files on the save set, satisfying the specified date to restore from will be incrementally restored. If a selection string is entered, it must conform to the requirements for the "/SELECT=" qualifier for backup and may contain directory and file strings but no device specifier. Now INCRESTOR tells the user to mount a Tape on MSA0: and press "Y" when ready to proceed. Once the user is ready to proceed and the tape is mounted, INCRESTOR can run unattended. It will broadcast messages at three minute intervals up to three times asking users to get off the disk so it may be restored properly. However, even if users do not get off the disk, the restoration still will proceed so potential restorers should be forwarned that it might be advisable to first disable logons and get users off the system prior to using INCRESTOR. JGDM-231 Page 3 Once all the warning messages go out, logicals names are set to warn users as they log in (if you let them) that a restoration operation is in progress. Then the restore operation itself starts specifying a log file as SYS$SYSDEVICE:[OPERATOR.BACKUP]INCRESTOR.LST. The results of all INCRESTOR operations are cumulatively written to this file including the name of every file restores, so it may be necessary to delete the file occasionally. When the BACKUP restore operation is complete, the INCRESTOR log file is printed and the operator is given the chance to restore another tape or exit. If the choice is to exit, the option to make the disk available to users again is also given. The log file should then be checked for errors and the files created by the restoration should be checked to see that they indeed have the proper UIC and that no problems occured which need to be corrected.