If the labels match, you have the proper protection, and the tape is expired, BACKUP performs the designated operation.
If you specify more than one label with the /LABEL qualifier and you do not specify the /EXACT_ORDER qualifier, the BACKUP operation succeeds if any of the labels you specify match the tape's volume label. For example, if the tape's volume label is MA1686, the BACKUP operation will succeed if you specify the following list of labels with the /LABEL qualifier:
/LABEL=(MA1684,MA1685,MA1686)
If the volume labels do not match, BACKUP displays the following error message:
%MOUNT-I-MOUNTED, DKA0 mounted on _SODAK$MUA0: %BACKUP-W-MOUNTERR, volume 1 on _SODAK$MUA0 was not mounted because its label does not match the one requested %BACKUP-W-EXLABEER, volume label processing failed because volume MB1684 is out of order, Volume label MA1684 was expected specify option (QUIT, NEW tape, OVERWRITE tape, USE loaded tape) BACKUP>
Depending on the option you specify, you can quit the backup operation (QUIT), dismount the old tape and mount a new one (NEW), overwrite the data on the tape (OVERWRITE), or USE the loaded tape.
If you specify more than one label with the /LABEL qualifier and you also specify the /EXACT_ORDER qualifier, BACKUP compares the label of the loaded tape with the first label that you specified with the /LABEL qualifier. If the labels match, BACKUP begins the operation. If the labels do not match, BACKUP prompts you with the previous message.
Assuming the volume labels of the tapes you use match the corresponding labels on the command line, BACKUP continues processing until it completes the operation or runs out of volume labels. If you do not specify enough labels on the command line to complete the operation or if the tape loaded does not have an ANSI label, BACKUP prompts you to enter a label for the tape in the drive.
If you use blank tapes or tapes that you intend to overwrite, use the /IGNORE=LABEL_PROCESSING qualifier. This suppresses the previous BACKUP message, which normally occurs if BACKUP encounters a non-ANSI-labeled tape during a save operation.
For more information about the /EXACT_ORDER, /IGNORE, and /LABEL qualifiers, see the OpenVMS System Management Utilities Reference Manual.
This section explains copying files, backing up files and directories, comparing files, and creating and listing BACKUP journal files.
Note
Note that when using the Backup utility with files, BACKUP processes relative version -0 as if it were 0, saving the most recent version instead of the earliest version of the file for processing.
You can copy files using BACKUP. The copy function of the BACKUP command differs from the DCL command COPY because it preserves certain file information such as the version number, creation dates, revision dates, and protection codes (although, by default, the owner UIC of the copies is the UIC of the current process). Also, unlike the DCL command COPY, you can use BACKUP to copy entire directory trees, maintaining the directory structure.
How to Perform This Task
To make identical disk-to-disk copies of files, use the following format:
BACKUP input-specifier output-specifier
Examples
$ BACKUP EMPLOYEES.DAT USER1:[BATES.TEST]EMPLOYEES.DAT
$ BACKUP USER1:[BATES...] USER2:[BATES...]
$ BACKUP [LYKINS...]*.*;* [OWLCR...]*.*;*
One of the most common BACKUP operations is to save files to a save set. There are several types of save sets. For more information on save sets, see Section 10.5.
How to Perform This Task
To back up files or directories, use the BACKUP command in the following format:
BACKUP input-specifier output-specifier [/SAVE_SET] [/LABEL=label]
The input-specifier specifies the file you want to back up, and the output-specifier specifies the device and save-set name.
When you save data to disk, use the output save-set qualifier /SAVE_SET. If you do not specify /SAVE_SET, BACKUP copies files in standard file format rather than creating a BACKUP save set. When you save data to tape, you do not need to specify /SAVE_SET; BACKUP treats all magnetic tape files as save sets. Use the /LABEL qualifier to specify the label of the tape you are using.
Examples
$ ALLOCATE MUA0: TAPE1 %DCL-I-ALLOC, MUA0: allocated $ INITIALIZE TAPE1 DLY101 $ BACKUP/LOG EMPLOYEES.DAT MUA0:EMPL_MAY91.BCK/LABEL=DLY101 %MOUNT-I-MOUNTED, BACKUP mounted on _MUA0: BACKUP-S-COPIED, copied DUA0:[SCHULT]EMPLOYEES.DAT;32 $
$ BACKUP [LYKINS...] TAPE:NOV13SAVE.BCK/LABEL=NOV13
$ BACKUP _From: DUA0:[MGR]EMPLOYEES.DAT,USER1:[RECORDS]DOOHAN.DAT,EVANS.DAT _To: MUA1:MONTHLY_AUG.BCK/LABEL=TAPE1
$ BACKUP _From: DUA0:[000000]*.* _To: MTA1:BACKUP.BCK,MTA2:
$ BACKUP STRATCOL1.DAT DUA1:STRATDAT1.BCK/SAVE_SET
remote_nodename"username password"::device_name:[directory]
$ BACKUP From: STRATCOL1.DAT To: NIMBL"ROGERS SANFRANCISCO"::WORK1:[ROGERS]STRATDAT1.BCK/SAVE_SET
$ MOUNT/FOREIGN DUA0: $ BACKUP [] DUA0:NOV12SAVE.BCK/SAVE_SET
$ BACKUP [REPORTS...] MIA11:REPORT.BCK/REWIND/IGNORE=LABEL_PROCESSING
$ MOUNT DUA1: PAYROLL %MOUNT-I-MOUNTED, PAYROLL mounted on _DUA1: $ MOUNT DUA21: DISK21 %MOUNT-I-MOUNTED, DISK21 mounted on _DUA21: $ BACKUP From: DUA1:[PAYROLL] To: DUA21:[PAYROLL_BACKUPS]PAY22MAY1996.SAV/SAVE_SET
$ MOUNT DUA1: PAYROLL %MOUNT-I-MOUNTED, PAYROLL mounted on _DUA1: $ MOUNT/FOREIGN DJA21: %MOUNT-I-MOUNTED, WEEKLY mounted on _DJA21: $ BACKUP From: DUA1:[PAYROLL] To: DJA21:[PAYROLL_BACKUPS]PAY22MAY1996.SAV/SAVE_SET
A BACKUP compare operation compares a save set with disk files or compares disk files with other disk files. Perform a compare operation to check the integrity of a file or volume after a copy, save, or restore operation. For example, you can use the compare operation to compare a save set with original files or to compare files or volumes copied using BACKUP with original files.
Note
Because BACKUP processes files by blocks, comparing files not produced by BACKUP is likely to cause mismatch errors in files that are apparently identical.
How to Perform This Task
The two ways to perform a compare operation are:
%BACKUP-I-STARTVERIFY, starting verification pass
Examples
$ BACKUP/COMPARE MTA0:2MAR1555.BCK [LYKINS]
$ BACKUP/COMPARE UPLIFT.EXE;3 UPLIFT.EXE;4 %BACKUP-E-VERIFYERR, verification error for block 16 of WRKD$:[LYKINS]UPLIFT.EXE;4
$ BACKUP/IMAGE/COMPARE DBA1: DBA2:
$ MOUNT/FOREIGN DBA2: $ BACKUP/PHYSICAL/COMPARE MIA0:PHYSBACK.BCK DBA2:
$ BACKUP/VERIFY/LOG FRED.DAT [FRIENDS]OLDFRED.DAT %BACKUP-S-CREATED, created DISK$:[FRIENDS]OLDFRED.DAT;3 %BACKUP-S-COMPARED, compared DISK$:[FRIENDS]OLDFRED.DAT;3
To keep a record of BACKUP operations, create a journal file. A BACKUP journal file contains records of BACKUP save operations and the file specifications of the files saved during each operation.
How to Perform This Task
To create a journal file, use the command qualifier /JOURNAL=[file-spec] in a BACKUP save operation.
To list the contents of a BACKUP journal file, enter a command in the following format:
BACKUP/LIST[=file-spec]/JOURNAL[=file-spec]
You cannot specify an input or output specifier with a BACKUP/LIST/JOURNAL command. If you omit the file specification from the command qualifier /LIST, BACKUP directs the output to your terminal; if you omit the file specification from the command qualifier /JOURNAL, the journal file receives the default BACKUP journal file name (SYS$DISK:[]BACKUP.BJL).
For more information about creating and listing BACKUP journal files, see the description of the /JOURNAL qualifier in the OpenVMS System Management Utilities Reference Manual.
Example
This example shows how to create a BACKUP journal file and list the contents of the BACKUP journal file:
$ BACKUP/JOURNAL/LOG/IMAGE DRA2: MIA0:3OCT.FUL %BACKUP-S-COPIED, copied DRA2:[COLLINS]ALPHA.DAT;4 %BACKUP-S-COPIED, copied DRA2:[COLLINS]EDTINI.EDT;5 . . . %BACKUP-I-RESUME, resuming operation on volume 2 %BACKUP-I-READYWRITE, mount volume 2 on _MIA0: for writing Press return when ready: [Return] %BACKUP-S-COPIED, copied DRA2:[LANE]MAIL.MAI;1 %BACKUP-S-COPIED, copied DRA2:[LANE]MEMO.RNO;5 . . . $ BACKUP/JOURNAL/LIST Listing of BACKUP journal Journal file _DB2:[SYSMGR]BACKUP.BJL;1 on 3-OCT-1996 00:40:56.36 Save set 3OCT.FUL created on 3-OCT-1996 00:40:56.36 Volume number 1, volume label 3OCT01 [COLLINS]ALPHA.DAT;4 [COLLINS]EDTINI.EDT;5 [COLLINS]LOGIN.COM;46 [COLLINS]LOGIN.COM;45 [COLLINS]MAIL.MAI;1 [COLLINS]MAR.DIR;1 [COLLINS.MAR]GETJPI.EXE;9 [COLLINS.MAR]GETJPI.LIS;14 . . [LANE]LES.MAI;1 . . Save set 3OCT.FUL created on 3-OCT-1996 00:40:56.36 Volume number 2, volume label 3OCT02 [LANE]MAIL.MAI;1 [LANE]MEMO.RNO;5 [LANE]MEMO.RNO;4 . . [WALTERS.VI]KD.RNO;52 End of BACKUP journal
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 an entire disk, see Section 10.16.
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.
Examples
$ BACKUP _From: MUA0:NIGHTLY.BCK/SELECT=[WORK.SEPT]INVOICES.DAT _To: USER1:[WORK.SEPT]INVOICES.DAT
$ 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 . . .
$ BACKUP TAPE:NOV12SAVE.BCK [LYKINS...]
$ BACKUP _From: MIA0:NOV2SAVE.BCK/SELECT=[LYKINS.GLENDO]STRAT1.DAT;5 _To: STRAT1.DAT;5 $ DIRECTORY STRAT1.DAT Directory [LYKINS.GLENDO] STRAT1.DAT;5 Total of 1 file. $
$ SET DEFAULT [REPORTS] $ DIRECTORY *.DIR Directory USER3:[REPORTS] INTERNAL.DIR 2 PUBLIC.DIR 5 SUMMARIES.DIR 1 TEST.DIR 3 WEEKLY.DIR 2 Total of 5 files, 13 blocks. $
$ BACKUP MUA0:MAY-10.BCK/SELECT=[REPORTS...] USER3:[REPORTS...]
$ BACKUP TAPE:NOV12SAVE.BCK/REWIND [*...]
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:
$ BACKUP MTA1:T.BCK/SAV/SELECT=[A.B.C.D.E.F.G.H.I.J.K.L]*.* DISK:[DIR]*.*;*
This section explains performing incremental and image backups to disk and tape.
Note
Do not use the menu system (which displays when you boot the OpenVMS VAX operating system CD--ROM) to back up user disks. Use the menu system to back up system disks only.
In addition, if you back up large user disks on VAX systems, BACKUP might need to page and thereby cause the operation to fail. If this occurs, use online BACKUP to back up those VAX user disks.
Digital recommends that you back up your disks with no interactive users logged in and with no applications running. This is because if BACKUP encounters an open file during a save operation, it issues an error message and does not copy the file. Also, because of the way BACKUP scans directories, any activity in a directory (such as creating or deleting files) can cause files to be excluded from the backup.
Note
The first time you back up a disk, you must perform an image backup using the BACKUP/IMAGE/RECORD command before you perform regular incremental backups. The image backup saves a copy of the entire disk and marks each file as being saved. Subsequent incremental backups assume that an image backup has been performed; only new or modified files are saved.If an image backup is not performed first, the incremental backups save more files than might be necessary to ensure that an incremental restore operation will be successful.
You can instruct BACKUP to save open files by using the /IGNORE=INTERLOCK qualifier on the BACKUP command, as described in Section 10.18.3. However, open files saved by BACKUP might contain inconsistent data, depending on the applications that are writing to the open files. BACKUP reports a message if either:
If a file with the specified version already exists, BACKUP reports the following error message:
RMS-E-FEX, file already exists, not superseded
How to Perform This Task
If several users are on your system, notify them that a disk backup is about to take place. If you have the OPER privilege, you can notify users with the REPLY/ALL command, as follows:
$ REPLY/ALL "System Backup About to Begin -- Open Files Will Not Be Backed Up"
When you enter this command, each interactive terminal on the system displays the following message:
Reply received on MYNODE from user SYSTEM at VTA28: 23:35:11 System Backup About to Begin -- Open Files Will Not Be Backed Up
As described in Section 10.2, an image backup of a disk provides you with an exact logical copy of all the files on the disk. You should perform image backups with no interactive users on the system because of open file considerations (described in Section 10.15.1). Also, system performance can be affected during the backup process, so it is best to schedule the backup during the least busy times for your system. You can optimize the speed of the backup procedure by ensuring that certain process and system parameters are set properly (as described in Section 10.7).
To perform an image backup, use the BACKUP command in the following format:
BACKUP/IMAGE [/RECORD] input-device output-specifier [/LABEL=label] [/REWIND]
The /IMAGE qualifier identifies the backup operation as an image backup. The /RECORD qualifier is optional and records the current date and time in the file header record of each file that is backed up. You must use the /RECORD qualifier if you are planning to perform future incremental backups. Specify the name of the disk you are backing up as the input-device; do not specify individual files. The /REWIND qualifier is optional depending on whether you want to initialize the tape. The /LABEL qualifier identifies the label of the tape.
Examples
$ INITIALIZE MKB100: WKLY $ MOUNT DKA100: DISK$1 %MOUNT-I-MOUNTED, DISK$1 mounted on _DKA100: $ BACKUP/IMAGE/RECORD/VERIFY _From: DKA100: _To: MKB100:FULL02.SAV/LABEL=WKLY %BACKUP-I-STARTVERIFY, starting verification pass
$ ALLOCATE MUA0:,MUA1:,MUA2: %DCL-I-ALLOC, MUA0: allocated %DCL-I-ALLOC, MUA1: allocated %DCL-I-ALLOC, MUA2: allocated $ BACKUP/IMAGE/RECORD/NOASSIST/RELEASE_TAPE _From: DKA100: _To: MUA0:FULL02.SAV,MUA1,MUA2/LABEL=MNTH %MOUNT-I-MOUNTED, MNTH mounted on _MUA0: %BACKUP-I-RESUME, resuming operation on volume 2 %MOUNT-I-MOUNTED, MNTH02 mounted on _MUA1: %BACKUP-I-RESUME, resuming operation on volume 3 %MOUNT-I-MOUNTED, MNTH03 mounted on _MUA2: $
As described in Section 10.2, an image backup of a disk provides you with an exact logical copy of all the files on the disk. You should perform image backups with no interactive users on the system because of open file considerations (described in Section 10.15.1). Also, system performance can be affected during the backup process, so it is best to schedule the backup during the least busy times for your system. You can optimize the speed of the backup procedure by ensuring that certain process and system parameters are set properly (as described in Section 10.7).
6017P031.HTM OSSG Documentation 22-NOV-1996 14:22:01.69
Copyright © Digital Equipment Corporation 1996. All Rights Reserved.