|
OpenVMS System Manager's Manual
- Initialize the tape in MKB100: with the label
WKLY.
- Mount the disk DKA100: (BACKUP will mount the
tape drive).
- Back up the disk DKA100: to the save set
FULL02.SAV on MKB100. The /IMAGE qualifier indicates that this is an
image backup. The /RECORD qualifier records the current date and time
of the backup in the file header record of each file that is backed up.
The /VERIFY qualifier causes BACKUP to check the contents of the output
specifier against the input specifier after the files are written to
the volume. The /LABEL qualifier indicates the label of the tape.
If you are backing up a large disk, you may want to use several
tape drives for the backup. For example:
$ ALLOCATE MUA0:,MUA1:,MUA2:(1)
%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(2)
%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:
$
|
In this example, the individual commands perform the following
actions:
- Allocate the tape drives that will be used in
the backup.
- Back up DKA100: to a save set. The /IMAGE
qualifier indicates this operation is an image backup. BACKUP begins
writing data to a save set on the tape in MUA0. If the tape in MUA0:
becomes full, BACKUP initializes the tape in MUA1: and continues
writing the save set. The tape in MUA1: gets the label MNTH02. If
necessary, BACKUP also uses the tape in MUA2.
The /RELEASE_TAPE
qualifier dismounts and unloads an output tape device after BACKUP
writes the save set. The /RECORD qualifier records the current date and
time in the file header record of each file that is backed up.
11.15.3 Performing Image Backups to Disk
As described in Section 11.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 11.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 11.7).
How to Perform This Task
To perform an image backup to a disk, use the BACKUP command in the
following format:
BACKUP/IMAGE/RECORD input-device output-specifier/SAVE_SET
|
The /IMAGE qualifier identifies the backup operation as an image
backup. The /RECORD qualifier records the current date and time in the
file header record of each file that is backed up. This information is
essential for future incremental backups. The /SAVE_SET qualifier
indicates that you are creating a save set on a disk.
Examples
- For example, if you want to create an image backup save set of the
disk named DUA1: on a disk named DUA2:, you could enter the following
commands:
$ MOUNT DUA1: USER1
%MOUNT-I-MOUNTED, USER1 mounted on _DUA1:
$ MOUNT DUA2: USER2
%MOUNT-I-MOUNTED, USER2 mounted on _DUA2:
$ BACKUP/IMAGE/RECORD
_From: DUA1:
_To: DUA2:[USER.BACKUPS]USER1.SAV/SAVE_SET
|
- You can also specify multiple disk drives as the output specifier
in the BACKUP command line. For example:
$ BACKUP/IMAGE/RECORD
_From: DUA0:
_To: DUB24:[USER.BACKUPS]USER1.SAV,DUB25/SAVE_SET
|
11.15.4 Performing Incremental Backups to Tape
As described in Section 11.2, an incremental backup of a disk
provides you with an exact copy of only those files that have been
created or modified since the last image or incremental backup in which
the /RECORD qualifier was used.
How to Perform This Task
To perform an incremental backup to tape, perform the following steps:
- Perform an image backup using the /RECORD qualifier (see
Section 11.15.2).
- To determine the date of the last backup that used the /RECORD
qualifier, enter the DIRECTORY/FULL command and the file name. For
example:
$ DIRECTORY/FULL LOGIN.COM
Directory WORK204:[HIGGINS]
LOGIN.COM;31 File ID: (23788,1,0)
Size: 7/9 Owner: [ACC,HIGGINS]
Created: 30-APR-2000 14:37:33.98
Revised: 30-APR-2000 14:37:34.44 (1)
Expires: <None specified>
Backup: 30-APR-2000 20:20:57.37
File organization: Sequential
File attributes: Allocation: 9, Extend: 0, Global buffer count: 0, No version limit
Record format: Variable length, maximum 94 bytes
Record attributes: Carriage return carriage control
RMS attributes: None
Journaling enabled: None
File protection: System:RWED, Owner:RWED, Group:RE, World:
Access Cntrl List: None
Total of 1 file, 7/9 blocks.
|
The date of the last /RECORD backup is indicated in the Backup
field of the display. In this example, a /RECORD backup was performed
on 30-APR-2000 20:20:57.37.
Note
If you used the /IGNORE=INTERLOCK qualifier to back up open files
during your last image backup or incremental backup in which the
/RECORD qualifier was used, see Section 11.18.3. If the files remain
open, they will not be included in the incremental backup because their
backup date fields are not as recent as the last image backup or
incremental backup in which the /RECORD qualifier was used.
|
- Enter the BACKUP command in the following format:
BACKUP/RECORD/SINCE=BACKUP input-specifier output-specifier[/LABEL=label] [/REWIND]
|
The /RECORD qualifier records the current date and time in the file
header record of each file that is backed up. This information is
essential for future incremental backups. The /SINCE=BACKUP qualifier
backs up files dated later than the last /RECORD backup. The /REWIND
qualifier is optional depending on whether you want to initialize the
tape. The /LABEL qualifier identifies the label of the tape.
Example
The following command is an example of an incremental backup in which
BACKUP saves all files on DRA1: that were modified since the previous
BACKUP/RECORD command and stores them in a save set named 20APR2000.SAV:
$ BACKUP/RECORD/SINCE=BACKUP/RELEASE_TAPE
From: DRA1:[000000...]
To: MIA0:20APR2000.SAV/LABEL=20JUNE
|
The /LABEL qualifier identifies the volume label of the tape. Also,
because BACKUP is performing an incremental rather than an image
backup, it is necessary to explicitly use the notation DRA1:[000000...]
to specify all the files on DRA1. The /SINCE=BACKUP qualifier saves all
files created or modified since the last /RECORD backup. The
/RELEASE_TAPE qualifier dismounts and unloads an output tape device
after BACKUP writes the save set and before it performs the action of
the /RECORD command.
11.15.5 Performing Incremental Backups to Disk
As described in Section 11.2, an incremental backup of a disk
provides you with an exact copy of only those files that have been
created or modified since the last image or incremental backup in which
the /RECORD qualifier was used.
How to Perform This Task
To make an incremental backup to disk, perform the following steps:
- To perform an incremental backup, you must first perform an image
backup using the /RECORD qualifier (see Section 11.15.2).
- To determine the date of the last backup that used the /RECORD
qualifier, enter the DIRECTORY/FULL command and the file name. For
example:
$ DIRECTORY/FULL LOGIN.COM
Directory WORK204:[HIGGINS]
LOGIN.COM;31 File ID: (23788,1,0)
Size: 7/9 Owner: [ACC,HIGGINS]
Created: 30-APR-2000 14:37:33.98
Revised: 30-APR-2000 14:37:34.44 (1)
Expires: <None specified>
Backup: 30-APR-2000 20:20:57.37
File organization: Sequential
File attributes: Allocation: 9, Extend: 0, Global buffer count: 0, No version limit
Record format: Variable length, maximum 94 bytes
Record attributes: Carriage return carriage control
RMS attributes: None
Journaling enabled: None
File protection: System:RWED, Owner:RWED, Group:RE, World:
Access Cntrl List: None
Total of 1 file, 7/9 blocks.
$
|
The date of the last /RECORD backup is indicated in the Backup
field of the display. In this example, a /RECORD backup was performed
on 30-APR-2000 20:20:57.37.
Note
If you used the /IGNORE=INTERLOCK qualifier to back up open files
during your last image backup or incremental backup in which the
/RECORD qualifier was used, see Section 11.18.3. If the files remain
open, they will not be included in the incremental backup because their
backup date fields are not as recent as the last image backup or
incremental backup in which the /RECORD qualifier was used.
|
- Enter the BACKUP command in the following format:
BACKUP/RECORD/SINCE=BACKUP input-specifier output-specifier/SAVE_SET
|
The /RECORD qualifier records the current date and time in the file
header record of each file that is backed up. The first step in an
incremental backup is an image backup (see Section 11.15.2). If you plan
to perform incremental backups, you must use the /RECORD qualifier when
you perform image backups. The /SINCE=BACKUP qualifier backs up files
dated later than the last /RECORD backup. The /SAVE_SET qualifier
indicates that you are creating a save set on a disk.
Examples
- To create an incremental backup of a disk named DUA55: on a
sequential disk save set on a disk named DJC12:, you could enter the
following commands:
$ MOUNT DUA55: DISK1
%MOUNT-I-MOUNTED, DISK1 mounted on _DUA55:
$ MOUNT/FOREIGN DJC12:
%MOUNT-I-MOUNTED, DISK2 mounted on _DJC12:
$ BACKUP/RECORD/SINCE=BACKUP
_From: DUA55:[000000...]
_To: DJC12:USER1.SAV/SAVE_SET
|
- You can also specify multiple disk drives as the output device in
the BACKUP command line. For example:
$ MOUNT DUA0: USER1
%MOUNT-I-MOUNTED, USER1 mounted on _DUA0:
$ MOUNT/FOREIGN DUB24:
%MOUNT-I-MOUNTED, DISK2 mounted on _DUB24:
$ MOUNT/FOREIGN DUB25:
%MOUNT-I-MOUNTED, DISK3 mounted on _DUB25:
$ BACKUP/RECORD/SINCE=BACKUP
_From: DUA0:[000000...]
_To: DUB24:USER1.SAV,DUB25/SAVE_SET
|
11.15.6 Performing Incremental Backups Using PATHWORKS for OpenVMS Servers
An incompatibility between the operating procedures of the PATHWORKS
for OpenVMS Macintosh server and OpenVMS incremental backup operations
can cause BACKUP to save entire disks or directory structures,
including subdirectories and files.
BACKUP can detect whether a directory file has been modified since the
date indicated by the Backup Date field in the file header. If a
directory file has been modified, all subdirectories and files of that
directory are saved for possible later restore operations.
Updating the modification date of directory files is unusual for
OpenVMS systems. However, it can happen if, for example, you rename a
directory file from one location to another. In contrast, the PATHWORKS
Macintosh server maintains the modification date of directory files for
Macintosh users; that is, it updates the modification date for each
directory change, file creation, and file deletion.
Thus, an incremental backup of a disk where PATHWORKS is used to serve
files to Macintosh users may result in saving the entire disk or entire
directories (including their subdirectories and files) instead of just
the user files that were created or modified since the last incremental
backup operation.
You can avoid saving files unnecessarily in either of the following
ways:
- By using the /NOINCREMENTAL qualifier.
On a save operation,
you can use the BACKUP qualifier /NOINCREMENTAL to avoid saving
all the files and subdirectories under directories that have
been modified. (Some files will, however, still be saved.) Use this
qualifier only if you are sure that you do not want to save all data.
Prior to OpenVMS Version 6.2, the system, by default, did not save
the files and subdirectories that were under directories that had been
modified. In OpenVMS Versions 7.0 and 7.1, to ensure a successful
restore, the system saved all files and subdirectories under
directories that had been modified. This behavior, however, sometimes
resulted in saving files and subdirectories that were not needed for
later restore operations. The /NOINCREMENTAL qualifier allows you more
control over the amount of file data that is saved.
- By performing a "dummy" BACKUP/RECORD operation on all
directory files immediately before performing the incremental
backup. For example:
$ BACKUP/RECORD/IGNORE=(INTERLOCK) -
_$ disk:[000000...]*.DIR;* -
_$ NLA0:DUMMY.BCK/SAVE/NOCRC/GROUP_SIZE=0
$
$ BACKUP/VERIFY/FAST/RECORD/IGNORE=(INTERLOCK) -
_$ /NOASSIST/COMMENT="Incremental backup of DISK:" -
_$ disk:[000000...]*.*;*/SINCE=BACKUP -
_$ tape:incr.bck/LABEL=incr/SAVE
|
In this example, the first BACKUP command performs the dummy backup
operation, and the second command performs the actual incremental
backup. The first command updates the Backup Date field for all the
directory files. Specifying the null output device NLA0:[000000...]
causes a save set file not to be written. Because no file information
needs to be retained from this operation, the /NOCRC and /GROUP_SIZE=0
qualifiers are specified to avoid CRC and XOR block calculation.
11.15.7 Backing Up Your Workstation Disk
On a standalone workstation, you are probably responsible for backing
up files on your user disks. Section 11.15.7.1, Section 11.15.7.2, and
Section 11.15.7.3 contain command procedures for making image,
incremental, and interactive backups of user disks on your workstation.
Compaq also provides two template command procedures in the
SYS$EXAMPLES directory for you to use in designing BACKUP command
procedures. These command procedures are called BACKUSER.COM and
RESTUSER.COM.
If you are not familiar with using command procedures, refer to the
OpenVMS User's Manual.
11.15.7.1 Using a Command Procedure for Nightly Image Backups
The following command procedure performs nightly image backups, backing
up all the files on disk DUA2: to a tape in MUA0. The files are copied
to a magnetic tape save set named FULL_BACKUP.SAV. This procedure is
particularly useful for backing up files on a MicroVAX system or
workstation.
How to Perform This Task
To use the command procedure, perform the following steps:
- Ensure that you have a batch queue available on your system. (See
Section 14.3 for information about setting up a batch queues.) You
submit the command procedure only once, and it will execute daily at
2:00 A.M. The command procedure automatically resubmits itself at 2:00
each morning; however, you must physically load a tape each day or the
backup procedure will fail. Even if the backup procedure fails,
however, the command procedure will continue to resubmit itself.
- From the SYS$MANAGER directory, create the command procedure as
shown and call it SYSTEM_BACKUP.COM.
$!
$! Resubmit this procedure --
$ SUBMIT/AFTER="TOMORROW+2:0" SYS$MANAGER:SYSTEM_BACKUP
$!
$ ON ERROR THEN GOTO FAILURE
$ SET PROCESS/PRIVILEGES=ALL
$!
$ REPLY/ALL -
"Full Backup About to Begin. Open Files Will Not Be Saved"
$!
$ BACKUP /IMAGE DUA2: MUA0:FULL_BACKUP.SAV /REWIND /IGNORE=LABEL_PROCESSING
$ DISMOUNT MUA0:
$ EXIT
$!
$FAILURE:
$ WRITE SYS$OUTPUT "---> Backup failed"
$ WRITE SYS$OUTPUT ""
$ DISMOUNT MUA0:
$ EXIT
|
- Edit the command procedure to reflect:
- The name of the disk that you want to back up. To back up more than
one disk, list each of the devices in the BACKUP command line. For
example, you could substitute the following lines for the BACKUP
command line in the preceding example:
.
.
.
$!
$ BACKUP/IMAGE WORK_DISK MIA0:WORK_BACK.SAV/REWIND
$ BACKUP/IMAGE PAYROLL_DISK MIA0:PAYROLL_BACK.SAV
$!
.
.
.
|
If you plan to perform any incremental backups later, include the
/RECORD qualifier in the BACKUP command line.
- The name of the tape drive that you will use.
- The name that you want to assign to the save set.
- Write down the name of the save set that you assigned.
- Submit the command procedure using the following command line (if
you gave your procedure a file name other than
SYS$MANAGER:SYSTEM_BACKUP.COM, substitute the appropriate file name):
SUBMIT/NOPRINT/AFTER="TOMORROW+2:0"/QUEUE=queue_name SYS$MANAGER:SYSTEM_BACKUP
|
- Be sure to change the tape daily and make sure that a tape is
physically loaded on the device that you specified. When the backup is
complete, keep the backup tape in a safe place and do not use the tape
again until after you make another image backup of your disks.
To stop the procedure after you have submitted it, use the DELETE/ENTRY
command. To find the entry number, use the SHOW ENTRY command. For
example:
$ SHOW ENTRY
Entry Jobname Username Blocks Status
----- ------- -------- ------ ------
14 SYS_BACKUP TPROULX Holding until 19-APR-2000 02:00
On generic batch queue CLUSTER_BATCH
$ DELETE/entry=583
|
11.15.7.2 Using a Command Procedure for Nightly Incremental Backups
You can use a similar command procedure to perform nightly incremental
backups of your disks. It might be more convenient to perform nightly
incremental backups and weekly image backups if either of the following
conditions applies:
- Interactive users are on your system at all times, and system
performance is noticeably affected by backups.
- A full backup does not fit on a single magnetic tape, but an
incremental backup does. In this case, an image backup requires the
presence of an operator (to change the tape), whereas an incremental
backup can be run as a batch job.
Suppose that you want to do nightly incremental backups at 11:00 P.M.,
except on Friday night, when you want to do an image backup. The
following command procedure executes an incremental backup on three
disks and automatically resubmits itself to run again the following
night, except for Friday night.
How to Perform This Task
To use the procedure, follow these steps:
- From the SYS$MANAGER directory, create the command procedure as
shown and call it INCREMENTAL_BACKUP.COM.
$!
$! Resubmit this procedure --
$ SUBMIT/AFTER="TOMORROW+23:0" SYS$MANAGER:INCREMENTAL_BACKUP
$!
$ TODAY = f$cvtime("today",,"weekday")
$ IF TODAY .EQS. "Friday" THEN GOTO DONE
$!
$ ON ERROR THEN GOTO FAILURE
$ SET PROC/PRIV=(OPER,BYPASS)
$!
$ REPLY/ALL -
"Incremental Backup About to Begin. Open Files Will Not Be Saved"
$!
$ BACKUP/RECORD/SINCE=BACKUP DRA0:[000000...] -
MIA0:INCREMENT1.SAV /LABEL=INC1
$ BACKUP/RECORD/SINCE=BACKUP DRA1:[000000...] -
MIA1:INCREMENT2.SAV /LABEL=INC2
$ BACKUP/RECORD/SINCE=BACKUP DRA2:[000000...] -
MIA2:INCREMENT3.SAV /LABEL=INC3
$ DISMOUNT MIA0:
$ DISMOUNT MIA1:
$ DISMOUNT MIA2:
$ EXIT
$!
$FAILURE:
$ WRITE SYS$OUTPUT "---> Backup failed"
$ WRITE SYS$OUTPUT ""
$ DISMOUNT MIA0:
$ DISMOUNT MIA1:
$ DISMOUNT MIA2:
$ EXIT
|
- Edit the procedure to reflect:
- The names of the disks that you want to back up
- The name of the tape drive that you will use
- The volume label of the tape
- The name that you want to assign to the save set
- The day of the week (if any) to be omitted in the incremental backup
In this example, the incremental backup will not be performed on
Friday, reserving that day for an image (full) backup.
- Be sure that an image backup has been made and also be sure that
you continue to make regular image backups. When you make your image
backups, be sure to use the /RECORD qualifier (as well as the /IMAGE
qualifier) in your BACKUP command line.
- Submit the command procedure using the following command line (if
you gave your procedure a file name other than
SYS$MANAGER:INCREMENTAL_BACKUP.COM, substitute the appropriate file
name):
$ SUBMIT/AFTER=23 SYS$MANAGER:INCREMENTAL_BACKUP
|
- Be sure that a tape is physically loaded on the device that you
specified. When the incremental backup is complete, keep the tape in a
safe place and do not use the tape again until you make another image
backup.
|