.; [2,24]AUTOBCKUP.CMD R RHODERICK 6-FEB-85 .; .; - Nightly automatic incremental backup of system disks. Backs up any files .; created or revised since the date/time of the last successful backup from .; any specified physical or logical devices. This command file should be run .; when there is absolutely no disk activity going on, to assure accurate .; duplication of files at a known time. To avoid problems with higher-level .; system operations, files in several accounts on LB0: ([1,4], [1,6], .; and [1,7]*.SYS) are not duplicated. Additionally, any files in account .; [1,3] on any disk are ignored. The strings SKPLB0 and SKPALL define the .; accounts/files to skip, and may be modified as needed. .; The date and time an input device is successfully backed up by this .; process is saved in a file on each disk backed up for reference the next .; time this process is run. The string FILSPC contains the location (UIC) .; and name of this file, and should be modified if needed. This file .; must be found on each disk with files to be backed up. The format of .; this file is: .; First record: LAST AUTOMATIC BACKUP .; Second record: dd-yyy-yy hh:mm:ss .; This procedure will back up files created or revised after the .; 'dd-mmm-yy hh:mm:ss' date/time. If this procedure successfully backs .; up files from an input device, it then saves the current date/time in .; a new file on the backed up disk. If the input disk is duplicated (as .; in online pack duplication for archival purposes, etc.), this file .; should reflect the date/time the pack is duplicated. .; .; - Input devices: .; The string INLIST defines all the physical or logical devices to back up, .; and may be modified as needed. This procedure will only back up files .; from a specified device if that device is already MOUNTED as a PUBLIC .; device, and contains an autobackup reference file. .; **NOTE** The device to back up TO must not be included in the list .; of devices to back up FROM. .; - Output device: .; Files to back up are BRUed to logical device NB0:, if it has been .; defined (ie., "ASN DR4:=NB0:/GBL"). If it has not, no backup occurs. .; If NB0: is assigned to a disk device, the string DLABEL must contain the .; label of the pack to back up to. The default label is the DECNET node .; name with the string "BACKUP" appended to it, ie, "DENVERBACKUP". If for .; any reason the pack cannot be logically mounted with the proper label, no .; backup occurs. .; If NB0: is assigned to a tape device, this process will attempt to append .; a backup set to it. For this reason, the tape must be initialized before .; this process uses it: "BRU/REW/DENS:nn LB0:[1,1]Z.Z Mdu:" will initialize .; the tape, where nn is either 800 or 1600, d is M, T, or S, depending on .; your type of tape drive, and u is the unit number of the tape drive. .; - Post backup processing: .; If the output device is a disk device, it may be desirable to limit the .; number of versions of backed up files to conserve space. This procedure .; will attempt to purge the files on the output disk to the number of .; versions specified in variable VERS. If VERS is 0, no files on the backup .; disk are purged. .; If DECNET software is used, FTS (network despooler task) log files tend to .; accumulate. This procedure will look for FTS.LOG files on any disk it .; backs up from, and deletes them after it backs up the device. If you don't .; want these files deleted, set the variable FTS to FALSE. .; .ENABLE SUBSTITUTION .ENABLE GLOBAL .; these definitions may be changed as required: .; list of devices (physical or logical) to back up .SETS INLIST "LB0:,UD1:,UD2:,UD3:,UD4:" .; UICs/files to skip backing up from LB0: (BRU /EXCLUDE string format) .SETS SKPLB0 "[1,4],[1,6],[1,7]*.SYS" .; UICs/files to skip backing up from any disk (BRU /EXCLUDE string format) .SETS SKPALL "[1,3],[2,24]INITDATE.DAT" .; label of disk to back up to .SETS DLABEL +"BACKUP" .; complete filespec of file to store last successful backup devices/dates .SETS FILSPC "[2,24]AUTOBCKUP.DAT" .; name of temporary BRU command file .SETS BRUFIL "LB0:[1,4]AUTOBRU.CMD" .; number of versions to purge all files on backup disk to .; (if set to zero, files on the backup disk will not be purged) .SETN VERS 3 .; FTS determines whether to delete FTS.LOG files from backed up disks .SETT FTS .SETF MOUNTD .SETF PIPREM .SETF BRUREM .SETF MOUREM .SETF DMOREM .; install PIP, BRU, MOU and DMO if they are not installed .ENABLE QUIET .IFNINS PIP .SETT PIPREM .IFT PIPREM INS $PIP .IF NE 1 .GOTO INSERR .IFNINS BRU .SETT BRUREM .IFT BRUREM INS $BRU .IF NE 1 .GOTO INSERR .IFNINS MOU .SETT MOUREM .IFT MOUREM INS $MOU .IF NE 1 .GOTO INSERR .IFNINS DMO .SETT DMOREM .IFT DMOREM INS $DMO .IF EQ 1 .GOTO CLNUP .INSERR: ; ; ERROR - could not install BRU, PIP, MOU or DMO - no backup done ; .GOTO EEXIT .CLNUP: .; delete any BRU command files this procedure may have left earlier PIP 'BRUFIL';*/DE/NM .DISABLE QUIET .; check for output device (logical NB0:) .TESTDEVICE NB0: .TEST "NSD" .IF EQ 0 .GOTO OKNB0 ; ; ERROR - Nightly Backup process logical output device ( NB0: ) not found ; -- NO BACKUP DONE -- ; .GOTO EEXIT .OKNB0: .; check if FTSDEQ task is installed .IFNINS FTSDEQ .SETF FTS .; start list of physical devices finished .PARSE ":" OULIST GARBAG .SETS OULIST OULIST+":" .; set up BRU switch for disk output device .SETS SW "/NOINITIALIZE/UFD/SUPERSEDE" .; check to see if the output device is a tape unit .SETF TAPE .SETS CHAR OULIST[1:1] .IF CHAR NE "M" .GOTO MNT .SETS CHAR OULIST[2:2] .IF CHAR NE "F" .IF CHAR NE "M" .IF CHAR NE "S" .IF CHAR NE "T" .GOTO MNT .SETT TAPE .; output to tape device - set up BRU switch for tape unit .SETS SW "/DENS:1600/REWIND/APPEND" .IF CHAR EQ "T" .SETS SW "/DENS:800/REWIND/APPEND" .GOTO BACKUP .; output to disk device - make sure the correct pack is in the correct drive .MNT: .ENABLE QUIET MOU NB0:'DLABEL' .DISABLE QUIET .IF EQ 1 .SETT MOUNTD .IFT MOUNTD .GOTO BACKUP ; ; ERROR occured during nightly backup; could not mount backup disk pack - ; no backup done ; .GOTO EEXIT .BACKUP: ; ; Begin automatic nightly files backup to 'OULIST' at '