Sie sind auf Seite 1von 114

VOS System Administration:

Backing Up and Restoring Data

Stratus Computer, Inc.


R285-03

Notice

The information contained in this document is subject to change without notice.


UNLESS EXPRESSLY SET FORTH IN A WRITTEN AGREEMENT SIGNED BY AN AUTHORIZED REPRESENTATIVE
OF STRATUS COMPUTER, INC., STRATUS MAKES NO WARRANTY OR REPRESENTATION OF ANY KIND WITH
RESPECT TO THE INFORMATION CONTAINED HEREIN, INCLUDING WARRANTY OF MERCHANTABILITY AND
FITNESS FOR A PURPOSE. Stratus Computer, Inc., assumes no responsibility or obligation of any kind for any errors
contained herein or in connection with the furnishing, performance, or use of this document.
Software described in Stratus documents (a) is the property of Stratus Computer, Inc., or the third party, (b) is furnished
only under license, and (c) may be copied or used only as expressly permitted under the terms of the license.
Stratus manuals document all of the subroutines and commands of the user interface. Any other operating-system
commands and subroutines are intended solely for use by Stratus personnel and are subject to change without warning.
This document is protected by copyright. All rights are reserved. No part of this document may be copied, reproduced, or
translated, either mechanically or electronically, without the prior written consent of Stratus Computer, Inc.
Stratus, the Stratus logo, Continuum, StrataNET, FTX, and SINAP are registered trademarks of Stratus Computer, Inc.
XA, XA/R, StrataLINK, RSN, Continuous Processing, Isis, the Isis logo, Isis Distributed, Isis Distributed Systems, RADIO,
RADIO Cluster, and the SQL/2000 logo are trademarks of Stratus Computer, Inc.
Apple and Macintosh are registered trademarks of Apple Computer, Inc.
IBM PC is a registered trademark of International Business Machines Corporation.
Intel is a registered trademark of Intel Corporation.
MC68000 and Motorola are registered trademarks of Motorola, Incorporated.
Sun is a registered trademark of Sun Microsystems, Inc.
Hewlett-Packard is a trademark of Hewlett-Packard Company.
All other trademarks are the property of their respective owners.
Manual Name: VOS System Administration: Backing Up and Restoring Data
Part Number: R285
Revision Number: 03
VOS Release Number: 14.0.0
Printing Date: January 1998
Stratus Computer, Inc.
55 Fairbanks Blvd.
Marlboro, Massachusetts 01752
1998 by Stratus Computer, Inc. All rights reserved.

Contents

Preface

ix

1. Introduction to Backup
Types of Backup
Objects
Path Names
Save Path Names
Common Path Names

1-1
1-1
1-2
1-2
1-2
1-3

2. Backing Up Data
Logical Backup: The save Command
The Steps in a Save
Using the Time Factor Arguments in Regular Backups
Updating the Date-Time-Saved Value with the -backup
Argument
Performing a Complete Save of an Entire Disk
Performing an Incremental Save of an Entire Disk
Performing a Consolidated Save of an Entire Disk
Performing a Supportive Save of an Entire Disk
Performing a Save While Users Are Working on the
Module
The Objects Arguments
Saving All Objects in the Current Directory
Saving All Objects on a Disk
Saving All Objects on All Disks
Saving All Objects in a Specified Path Name
Saving All Objects Listed in a Control File
Specifying Objects Not to Save
The Log Arguments
Backup Log Files
Tape Log Files

2-1
2-1
2-2
2-3
2-4
2-5
2-6
2-6
2-7
2-7
2-8
2-8
2-8
2-9
2-9
2-9
2-10
2-10
2-11
2-11

Contents

iii

Contents

Using Tapes
Preparation
Specifying Tape Volume IDs
Restarting a Save
The Resave Log File
Responding to a Save Interrupt
Using the T401/T402 Tape Drive for Multitape Saves
Physical Backup: The dump_disk Command
The dump_disk Arguments
Dumping the Master Disk
Dumping All the Disks in a Module
Using the T401/T402 Tape Drive with the dump_disk
Command
Using Command Macros for Backup

3. Backup Operations
Planning a Backup Schedule
Schedule 1
Schedule 2
Restricting Operators to Backup and Restore
Keeping Backup Records

2-11
2-11
2-12
2-13
2-13
2-14
2-15
2-16
2-16
2-17
2-18
2-18
2-19

3-1
3-1
3-1
3-2
3-3
3-3

4. Restoring Data from Logical Backups


4-1
Retrieving Backed-Up Data: The restore Command
4-1
The Steps in Data Retrieval
4-2
Selecting the Objects to Restore
4-3
Restoring Objects from a Specified Directory
4-4
Restoring Objects from Multiple Directories
4-4
Restoring Specified Objects
4-4
Restoring All Objects on a Tape
4-4
Modifying the Objects Arguments
4-5
Using the -backup Argument
4-6
Restoring Objects to Specified Locations
4-7
Restoring Objects to a Specified Directory
4-7
Restoring Objects to the Current Directory
4-7
Restoring Objects to Their Previous Locations on Disk 4-8
Miscellaneous Arguments
4-8
Log Files
4-9
Backup Logs
4-9
Tape Logs
4-10

iv

VOS System Administration: Backing Up and Restoring Data (R285)

Contents

Restoring an Object Other Than the Top Directory of a Disk


Locating the Object Using Backup Logs and Tape Logs
Creating a Backup Log Using restore Arguments
Restoring the Object
Multiple Restore Operations
Retrieving the Complete Contents of a Disk
Retrieving the Contents of a Nonboot Disk
Retrieving the Contents of a Master Disk
Using Pipe Files to Copy or Move Directories
Copying Tapes

5. Commands
copy_tape
dump_disk
restore
save

4-11
4-11
4-13
4-14
4-14
4-14
4-15
4-18
4-23
4-25

5-1
5-2
5-5
5-10
5-22

Appendix A. Quick Reference: Characteristics of Logical and Physical


Backup
A-1

Index

Index-1

Contents

Figures

Figure 1-1. A Sample Directory Hierarchy

vi

VOS System Administration: Backing Up and Restoring Data (R285)

1-4

Tables

Table 4-1.
Table 5-1.
Table 5-2.
Table 5-3.
Table 5-4.
Table 5-5.
Table A-1.

The Modifying Arguments to the restore Command


The Objects Arguments to the restore Command
The Modifying Arguments to the restore Command
The Destination Arguments to the restore Command
How the Operating System Determines Restore Path
Names
The Interaction of the Time and Objects Arguments to the
save Command
Differences Between Logical and Physical Backup

4-5
5-18
5-19
5-19
5-20
5-30
A-1

Tables

vii

Tables

viii

VOS System Administration: Backing Up and Restoring Data (R285)

Preface

The manual VOS System Administration: Backing Up and Restoring Data (R285)
documents the procedures for backing up and restoring data on Stratus systems.
This manual is intended for system administrators and operators who perform backup.

Manual Version
This manual is a revision. However, it contains no new information for VOS
Release 14.0.0.

Related Manuals
Refer to the following Stratus manuals for related documentation.
VOS Tape Processing Users Guide and Programmers Reference (R052)
Tape Users Quick Reference Guide (R075)
VOS System Administration: Disk and Tape Administration (R284)
T401/T402 Tape Drive Users Guide (R315)
VOS Commands Reference Manual (R098)

Notation Conventions
This manual uses the following notation conventions.
Italics introduces or defines new terms. For example:

The master disk is the name of the member disk from which the module was
booted.
Boldface emphasizes words in text. For example:

Every module must have a copy of the module_start_up.cm file.


Monospace represents text that would appear on your terminals screen (such as

commands, subroutines, code fragments, and names of files and directories).


For example:
change_current_dir (master_disk)>system>doc

Preface

ix

Preface
Monospace italic represents terms that are to be replaced by literal values. In the

following example, the user must replace the monospace-italic term with a literal
value.
list_users -module module_name
Monospace bold represents user input in examples and figures that contain both

user input and system output (which appears in monospace). For example:
display_access_list system_default
%dev#m1>system>acl>system_default
w

*.*

Key Mappings for VOS Functions


VOS provides several command-line and display-form functions. Each function is
mapped to a particular key or combination of keys on the terminal keyboard. To
perform a function, you press the appropriate key(s) from the command-line or display
form. For an explanation of the command-line and display-form functions, see the
manual Introduction to VOS (R001).
The keys that perform specific VOS functions vary depending on the terminal. For
example, on a V103 ASCII terminal, you press the <Shift> and <F20> keys simultaneously
to perform the INTERRUPT function; on a V105 PC/+ 106 terminal, you press the <1> key
on the numeric keypad to perform the INTERRUPT function.
Certain applications may define these keys differently.
Refer to the documentation for the application for the
specific key mappings.

VOS System Administration: Backing Up and Restoring Data (R285)

Preface

The following table lists several VOS functions and the keys to which they are mapped
on commonly used Stratus terminals and on an IBM PC or compatible PC that is
running the Stratus PC/Connect-2 software. (If your PC is running another type of
software to connect to a Stratus host computer, the key mappings may be different.)
For information about the key mappings for a terminal that is not listed in this table, refer
to the documentation for that terminal.

V103
ASCII

V103
EPC

IBM PC or
Compatible
PC

V105
PC/+ 106

V105
ANSI

CANCEL

<F18>

<5> or *

<F18>

CYCLE

<F17>

<F12>

<Alt>-<C>

<4>

<F17>

<Shift>-<F17>

<Shift>-<F12>

<Alt>-<B>

<7>

<F19>

HELP

<Shift>-<F8>

<Shift>-<F2>

<Shift>-<F2>

<Shift>-<F8>

<Help>

INSERT DEFAULT

<Shift>-<F11>

<Shift>-<F10>

<Shift>-<F10>

<Shift>-<F11>

<F11>

<F11>

<F10>

<F10>

<F11>

<Insert_Here>

INTERRUPT

<Shift>-<F20>

<Shift>-<Delete>

<Alt>-<I>

<1>

<Shift>-<F20>

NO PAUSE

<Shift>-<F18>

<Shift>- *

<Alt>-<P>

<8>

<Shift>-<F18>

VOS Function

CYCLE BACK
DISPLAY FORM

INSERT SAVED

<6>

or

<Shift>-<F17>
-

<F19> or
<Shift>-<Help>

Numeric-keypad key

Format for Commands and Requests


Stratus manuals use the following format conventions for documenting commands and
requests. (A request is typically a command used within a subsystem, such as
analyze_system). Note that the command and request descriptions do not
necessarily include all of the following sections.

Preface

xi

Preface

add_disk

Privileged

Purpose
The add_disk command tells the operating system on the current
module to recognize the specified logical volume for the duration of
the current bootload.

Display Form
-------------------------- add_disk ------------------------disk_name:
module_name: current_module

Command Line Form


add_disk disk_name
[ module_name ]

Arguments
Required
disk_name
The name of the logical volume to be recognized for the current
bootload.
.
.
.

A name

The name of the command or request is at the top of the first page of the
description.
B Privileged

This notation appears after the name of a command or request that can be issued
only from a privileged process. (See the online glossary, which is located in the file
>system>doc>glossary.doc, for the definition of privileged process.)
C Purpose

Explains briefly what the command or request does.


D Display Form

Shows the form that is displayed when you type the command or request name
followed by -form or when you press the key that performs the DISPLAY FORM
function. Each field in the form represents a command or request argument. If an

xii

VOS System Administration: Backing Up and Restoring Data (R285)

Preface

argument has a default value, that value is displayed in the form. (See the online
glossary for the definition of default value.)
The following table explains the notation used in display forms.
The Notation Used in Display Forms
Notation

Meaning
Required field with no default value.
The cursor, which indicates the current position on the
screen. For example, the cursor may be positioned on the
first character of a value, as in a ll.

current_user
current_module
current_system
current_disk

The default value is the current user, module, system, or


disk. The actual name is displayed in the display form of the
command or request.

E Command-Line Form

Shows the syntax of the command or request with its arguments. You can display
an online version of the command-line form of a command or request by typing the
command or request name followed by -usage.
The following table explains the notation used in command-line forms. In the table,
the term multiple values refers to explicitly stated separate values, such as two or
more object names. Specifying multiple values is not the same as specifying a star
name. (See the online glossary for the definition of star name.) When you specify
multiple values, you must separate each value with a space.

Preface

xiii

Preface

The Notation Used in Command-Line Forms


Notation

Meaning

argument_1

Required argument.

argument_1...

Required argument for which you can specify multiple values.

Set of arguments that are mutually exclusive; you must specify


one of these arguments.

argument_1

argument_2

[argument_1]

[argument_1]...
argument_1
argument_2

Optional argument.
Optional argument for which you can specify multiple values.
Set of optional arguments that are mutually exclusive; you can
specify only one of these arguments.

Note: Dots, brackets, and braces are not literal characters; you should not type them.
Any list or set of arguments can contain more than two elements. Brackets and braces
are sometimes nested.

F Arguments

Describes the command or request arguments. The following table explains the
notation used in argument descriptions.
G The Notation Used in Argument Descriptions

Notation

Meaning

<CYCLE>

There are predefined values for this argument. In the display


form, you display these values in sequence by pressing the key
that performs the CYCLE function.

Required

You cannot issue the command or request without specifying a


value for this argument.
If an argument is required but has a default value, it is not labeled
Required since you do not need to specify it in the command-line
form. However, in the display form, a required field must have a
valueeither the displayed default value or a value that you
specify.

(Privileged)

xiv

Only a privileged process can specify a value for this argument.

VOS System Administration: Backing Up and Restoring Data (R285)

Preface
H The following additional headings may appear in the command or request

description: Explanation, Error Messages, Examples, and Related Information.


Explanation
Explains how to use the command or request and provides supplementary
information.
Error Messages
Lists common error messages with a short explanation.
Examples
Illustrates uses of the command or request.
Related Information
Refers you to related information (in this manual or other manuals), including
descriptions of commands, subroutines, and requests that you can use with or in
place of this command or request.

Online Documentation
Stratus provides the following types of online documentation.
The directory >system>doc provides supplemental online documentation. It

contains the latest information available, including updates and corrections to


Stratus manuals and a glossary of terms.
Stratus offers some of its manuals online, via StrataDOC, an online-documentation

product that consists of online manuals and StrataDOC Viewer, delivered on a


CD-ROM (note that you must order StrataDOC separately). StrataDOC Viewer
allows you to access online manuals from an IBM PC or compatible PC, a Sun or
Hewlett-Packard workstation, or an Apple Macintosh computer. StrataDOC
provides such features as hypertext links and, on the workstations and PCs, text
search and retrieval across the manual collection. The online and printed versions
of a manual are identical.
If you have StrataDOC, you can view this manual online.
For a complete list of the manuals that are available online as well as more
information about StrataDOC, contact your Stratus account representative.

Preface

xv

Preface

Ordering Manuals
You can order manuals in the following ways.
If your system is connected to the Remote Service Network (RSN), issue the

maint_request command at the system prompt. Complete the on-screen form


with all of the information necessary to process your manual order.
Customers in North America can call the Stratus Customer Assistance Center

(CAC) at (800) 221-6588 or (800) 828-8513, 24 hours a day, 7 days a week. All
other customers can contact their nearest Stratus sales office, CAC office, or
distributor; see the file cac_phones.doc in the directory >system>doc for CAC
phone numbers outside the U.S.
Manual orders will be forwarded to Order Administration.

Commenting on This Manual


You can comment on this manual by using the command comment_on_manual or by
completing the customer survey that appears at the end of this manual. To use the
comment_on_manual command, your system must be connected to the RSN. If your
system is not connected to the RSN, you must use the customer survey to comment
on this manual.
The comment_on_manual command is documented in the manual VOS System
Administration: Administering and Customizing a System (R281) and the VOS
Commands Reference Manual (R098). There are two ways you can use this command
to send your comments.
If your comments are brief, type comment_on_manual, press <Enter> or <Return>, and

complete the data-entry form that appears on your screen. When you have
completed the form, press <Enter>.
If your comments are lengthy, save them in a file before you issue the command.

Type comment_on_manual followed by -form, then press <Enter> or <Return>. Enter


this manuals part number, R285, then enter the name of your comments file in the
-comments_path field. Press the key that performs the CYCLE function to change
the value of -use_form to no and then press <Enter>.

If comment_on_manual does not accept the part


number of this manual (which may occur if the manual is
xvi

VOS System Administration: Backing Up and Restoring Data (R285)

Preface

not yet registered in the manual_info.table file), you


can use the mail request of the maint_request
command to send your comments.
Your comments (along with your name) are sent to Stratus over the RSN.
Stratus welcomes any corrections and suggestions for improving this manual.

Preface

xvii

Preface

xviii

VOS System Administration: Backing Up and Restoring Data (R285)

Chapter 1
Introduction to Backup

1-

This chapter introduces you to backup and documents the operating system directory
structure.

Types of Backup
Backup copies all or some of the data stored on a systems disks. The purpose of
backup is to save current copies of files, directories, and links, so if objects are lost they
can be retrieved. The objects are stored on tape and are copied back to the module
when needed.
There are two types of backup, logical and physical. Logical backup is performed with
the save command, and physical backup is performed with the dump_disk command.
You can use tapes from either a logical or physical backup to recover the entire
contents of a disk. However, only a logical backup allows selective recovery of saved
objects.
Physical backup is a faster procedure than logical backup. The system can be used
during both types of backup, but you should request users to restrict disk activity for a
short time during a physical backup.
The dump_disk command writes entire logical volumes to tape. A logical volume is
one or more physical disks. The save command operates on either entire logical
volumes or combinations of directories, files, or links on that logical volume. Read the
information about logical volumes in VOS System Administration: Disk and Tape
Administration (R284), before working with either the save or dump_disk command.
See Appendix A for a table listing the characteristics of logical and physical backup.
For more information on tapes, see VOS Tape Processing Users Guide and
Programmers Reference (R052).

Introduction to Backup

1-1

Objects

Objects
In this manual, the term object refers to a directory, a file, or a link. When the object
referred to is the directory at the highest level of the directory hierarchy, the object
consists of all the contents of a disk. If you give the name of a logical volume to be
backed up, the object can consist of all of the contents of multiple physical disks.

Path Names
A path name is a unique name that identifies a device or locates an object in the
system. The full path name of a file or directory is a combination of the following names:
1. the name of the system containing the object preceded by a percent sign (%)
2. the name of the disk containing the object preceded by a number sign (#)
3. the names of the directories in the path of the object, in order, each preceded by
the greater-than sign (>)
4. the name of the object preceded by the greater-than sign (>).
The greater-than sign (>) is used to separate directories in the path name, and
precedes the file name at the end of the path. Suppose you have a system named s1,
which contains a disk named d01. The following is an example of a full path name for
the file named reports.
%s1#d01>Accounting>Carlson>reports
The file is immediately contained in the home directory Carlson, which is subordinate
to the group directory Accounting. The Accounting directory is a subdirectory on
the disk d01. Disk d01 is on system %s1.
Path names supply a way for you to locate objects on tapes as well as in the system.
Before working with save and restore, you must understand how to work with save
path names and common path names.
Save Path Names
The save command saves the full path name of every object saved. This is called the
save path name of the saved object. It provides a record for every saved object, of the
objects name and its location in the directory hierarchy at the time that it was saved.
When you issue the restore command with the arguments -no_restore, -list,
and -same_place, the command displays a list of the save path names of all the
objects saved on a mounted tape or to a disk file.

1-2

VOS System Administration: Backing Up and Restoring Data (R285)

Objects

Common Path Names


For every save command, a common path name is saved, which can be used by the
restore command in determining which saved objects to restore. The operating
system determines the common path name in these ways:
If you save a single directory, the path name of that directory is the common path

name.
If you save more than one directory, save looks for a directory from which the

saved directories branch. The path name of this directory is then the common path
name.
If save cannot find a directory name for the common path name, it sets the

common path name to the null string.


Finding a Common Path Name
In order to restore any objects, the restore command must have a common path
name. The common path name must be a full path name common to the objects you
want restored. The restore command obtains a common path name in the following
ways:
The restore command finds the common path name stored in the save file or

save tape.
The restore command can construct a common path name by combining a path

name supplied in the -source argument with the common path name found on
the save file or save tape.
If the common path name in the save file or save tape is a null string, restore

asks you for a common path name, unless you have specified a full path name in
the -source argument.
Figure 1-1 shows a sample directory hierarchy.

Introduction to Backup

1-3

Objects

s1

d01

Sales

Accounting

Subdirectories

Smith

Jones

prospects

programs

Files

Clark

Files

Files

customers commissions

Subdirectories

Carlson
Files

Files

reports

finance

ledger

records

finance
cp0279

Figure 1-1. A Sample Directory Hierarchy

1-4

VOS System Administration: Backing Up and Restoring Data (R285)

Objects

According to the hierarchy depicted in Figure 1-1:


the common path name for customers and commissions is >Sales>Smith
the common path name for customers and prospects is >Sales
the common path name for both files named finance is >Accounting.

When you save d01, the save path names for the files in the Clark directory are:
%s1#d01>Accounting>Clark>finance
%s1#d01>Accounting>Clark>reports
When you restore the Clark directory, the common path name of the objects in the
Clark directory is:
%s1#d01>Accounting>Clark
The directory hierarchy shown in Figure 1-1 is used to illustrate the examples in
Chapter 2 and Chapter 4, and the descriptions of the restore and save commands
in Chapter 5.
For more information about objects and path names, see VOS Reference
Manual (R002) and VOS Commands Users Guide (R089).

Introduction to Backup

1-5

Objects

1-6

VOS System Administration: Backing Up and Restoring Data (R285)

Chapter 2
Backing Up Data

2-

This chapter describes the procedures for backing up data on modules. It describes the
types of backup and how to perform backups using the save and dump_disk
commands.

Logical Backup: The save Command


The save command is used in the logical backup procedure to write one or more
objects to tape or disk. However, this chapter describes only saving to tape, since this
is the normal backup procedure. See VOS System Administration: Disk and Tape
Administration (R284) for information about saving to disk.
The save command copies files, their associated indexes, the access control list
(ACL), and the default access control list (DACL) associated with each directory. The
access control lists govern which individuals or groups may use or modify files or
directories in the operating system.
The command has one required argument, tape_device_or_port_name. There
are three ways to use this command:
by invoking the attach_port and mount_tape commands, followed by save.
by invoking an automatic mount. Invoke the attach_port command, followed by

save. Using the save command automatically eliminates the need for explicitly
mounting the tape. However, you will need to invoke dismount_tape to dismount
the tape.
by invoking an implicit attachment. Invoke save followed by the name of the tape

device attached to the module. Using save implicitly eliminates the need for
explicitly attaching the port, mounting the tape, dismounting the tape, and
detaching the port.
If you give a device name, and a port is already attached,
that port is used. Since this is not an implicit port
attachment, you need to explicitly detach the port after the
tape command is finished.
If you need to perform only one tape operation, invoking the save command implicitly
saves time. However, if you need to use multiple tapes, or if you are not sure which
Backing Up Data

2-1

Logical Backup: The save Command

objects you have to save before you start, you should explicitly attach the port and
mount the tape first.
You must also supply the volume ID of the tape that is loaded on the tape drive. You
can do this in one of the following ways:
with the -volume_ids argument
in response to a prompt from the save command
with the mount_tape command by mounting the tape before executing the save

command.
Objects saved to tape with the save command can later be recovered from the tape
with the restore command. Restoring objects is documented in Chapter 4 and the
restore command is documented in Chapter 5.
A related command, save_object, saves one object (which could be an entire
directory hierarchy) on tape or disk. See VOS Commands Reference Manual (R098)
for information about save_object.

The Steps in a Save


To save the content of directory %s1#d01>Accounting to tape V1, perform the
following steps. The -compression and -unattended arguments can now be used
with the save command. See the VOS Commands Reference Manual (R098).
1. Load the tape on a tape drive connected to %s1#m1. See VOS Tape Processing
Users Guide and Programmers Reference (R052) for information on using tape
drives.
2. Issue the following command.
save %s1#tape.1.0 %s1#d01>Accounting -volume_ids V1
The following prompt appears on your screen.
Begin save on %s1#tape.1.0 to be designated as the
following.
Access Rights:
read_write (ring_in).
Tape Format:
ansi.
Volume ID:
V1.
Owner ID:
Maureen_Jones.Development
Proceed with create volume? (yes, alter_parameters,
abort)

2-2

VOS System Administration: Backing Up and Restoring Data (R285)

Logical Backup: The save Command

3. Type y and press the <RETURN> key to proceed with the save. The following prompt
appears.
Begin save: 95-02-06 6:00:01 EDT
The common path name for this save is "%s1#d01"
When the save is finished, the operating system sends the terminal the following
message.
End of save.
When an implicit save is finished, the tape rewinds automatically and unloads.
If you invoke attach_port before you invoke save, the
current position on the save tape is the end of the tape
when the save finishes. If you press <CTRL><BREAK> while
saving a set of objects, the operating system positions the
tape to the beginning of the file that save was writing.
4. Label the tape with information about the save (for example, the volume ID, the
date of save, and the name of the disk saved). See the section Keeping Backup
Records in Chapter 3 for more information.
These are the basic steps in a simple save. The save command arguments let you
select which objects on a disk to save depending on their:
modification time
location on the disk.

The arguments governing time for save are called the time arguments, and the
arguments relating to objects are called the objects arguments.
You can also specify the type of information to log about the save. The rest of this
section documents the arguments of the save command.
Before performing a save, calculate how many reels or cartridges of tape will be
needed to back up the data. The amount of tape depends on many factors, including
the number of blocks stored on the disk. For information on making this calculation, see
the VOS Tape Processing Users Guide and Programmers Reference (R052).

Using the Time Factor Arguments in Regular Backups


This section describes how to use the time factor arguments in regular backups. When
you perform backups, you do not back up the entire system each time you issue the
save command. You save only those objects modified since the last save. Each file
has a characteristic called the date-time-saved value. This value is set whenever the
save command is issued with the -backup argument.
There are four types of saves:
Backing Up Data

2-3

Logical Backup: The save Command


complete
incremental
consolidated
supportive.

A complete save saves every specified object regardless of its date-time-saved value,
and resets the date-time-saved value to the date of the save. You must use the
-backup argument in a complete save, but you do not need to use a time factor
argument, such as the -modified_since_saved argument.
An incremental save saves objects modified since the last save. You must use both the
-backup and -modified_since_saved arguments in an incremental save.
A consolidated save merges several incremental saves. You must use both the
-backup and the -modified date_time arguments in a consolidated save.
A supportive save saves specified objects not saved since a given time. You must use
both the -backup and -date date_time arguments in a supportive save.
Incremental, consolidated, and supportive saves are also called partial saves.
For information on how to use these different types of saves in a backup schedule, see
Chapter 3, Backup Operations.
The objects saved also depend upon the objects arguments specified. The objects
arguments are documented later in this chapter. See also the arguments table in the
save command description in Chapter 5 for information about the interaction of the
save command arguments.

Updating the Date-Time-Saved Value with the -backup Argument


When performing backup, give the -backup argument to the save command. This
argument allows you to:
save objects to which you do not have access (within the parameters defined by

the objects arguments, which are explained later in this chapter)


update the date-time-saved value of each object saved.

The date-time value must be given in a standard operating system date/time format.
See the description of the save command for more information about the date/time
formats. Examples of valid date/time formats appear in the following sections.
Only a privileged process can give the -backup
argument. This means you must be able to log in as a
privileged user to use the -backup argument. A
nonprivileged process must have either read or write
2-4

VOS System Administration: Backing Up and Restoring Data (R285)

Logical Backup: The save Command

access to files and status or modify access to directories


to save them, but a privileged process can give the
-backup argument to override these access
requirements. See the section Restricting Operators to
Backup and Restore in Chapter 3 for more information
about restricting the access of operators.
Performing a Complete Save of an Entire Disk
When you use the -backup argument without a time factor argument, the save
command performs a complete save, which is a backup of all of the designated objects.
The term complete indicates only that there is no time restriction determining which
objects are saved. There can, however, be restrictions imposed by the objects
arguments, as described later in this chapter.
The operating system saves files that are locked for writing and makes repeated
passes through such files to accomplish the save. For more information, see the
operating system rules for saving objects under the save command description in
Chapter 5.
To save all the objects on d01 and update the date-time-saved value of each object
saved, issue the following commands. The -compression and -unattended
arguments can now be used with the mount_tape command. See the VOS
Commands Reference Manual (R098).
attach_port port1 %s1#tape.1.0
mount_tape port1
The mount_tape command issues the following prompt:
Mount tape on %s1#tape.1.0
Access Rights:
Tape Format:
Volume ID:
Owner ID:
Okay to mount tape volume?
create_volume, abort)

as specified in the following.


readonly (ring_out).
ansi.
V1.
Maureen_Jones.Development
(yes, alter_parameters,

Type y and press the <RETURN> key. Then issue the save command to begin the save
of the disk.
save port1 #d01 -backup -volume_ids V1 V2 V3
The complete save of a disk usually requires more than one tape. When you know
more than one tape is needed to complete a save, you must attach the port and mount
the tape explicitly. The save command prompts you to load a new tape as it reaches

Backing Up Data

2-5

Logical Backup: The save Command

the end of a reel. When the prompt End of save appears, invoke the following
commands.
dismount_tape port1
detach_port port1
If you issue this command on Wednesday, January 25, 1995, all the objects on d01 are
assigned the date-time-saved value of 95-01-25.
Performing an Incremental Save of an Entire Disk
When you use the -backup and modified_since_saved arguments, the save
command performs an incremental save. All objects on the disk modified since the last
backup are saved.
To save all the objects on d01 modified since the last save, and update the
date-time-saved value of each object saved, issue the following command.
save %s1#tape.1.0 #d01 -modified_since_saved -backup
-volume_ids V1
If the last save on d01 was on 95-01-25, this incremental save will save a file modified
on 95-02-2, but not one modified on 95-01-08.
Performing a Consolidated Save of an Entire Disk
When you use the -backup and -modified date_time arguments, the save
command performs a consolidated backup. All objects on the disk modified since the
specified date are saved.
This save is called a consolidated save because it can consolidate several incremental
saves. For example, you can perform an incremental save every day, saving
everything modified since the last daily save. Then at the end of the week, you can
perform a consolidated save, using the date of the first daily incremental save of that
week. This saves the latest version of each object modified during the week. You can
then free for reuse the tapes used for incremental saves during the week.

To save all the objects on d01 modified since February 2 at 8 A.M., and update the
date-time-saved value of each object saved, issue the following command.
save %s1#tape.1.0 #d01 -modified 95-02-02 08:00:00 -backup
-volume_ids V1
The consolidated save will save a file modified on 95-02-03, but not one modified on
95-01-30.
2-6

VOS System Administration: Backing Up and Restoring Data (R285)

Logical Backup: The save Command

Performing a Supportive Save of an Entire Disk


When you use the -backup and -date date_time arguments, the save command
performs a supportive save. All objects on the disk not saved since the specified date
are saved. This save is a supportive save because, without taking the time and space
to do a complete save, it saves those objects passed over by incremental and
consolidated saves.
To save all the objects on d01 not saved since February 2 at 8 A.M., and update the
date-time-saved value of each object saved, issue the following command.
save %s1#tape.1.0 #d01 -date 95-02-02_08:00:00 -backup
-volume_ids V1
The supportive save will save a file saved on 95-01-21, but not one modified on
95-02-03.
Performing a Save While Users Are Working on the Module
In general, it is preferable to perform saves when there are few users on a module,
such as at night or on the weekend. However, it is often impractical to completely
restrict system usage during a backup. The -after argument to the save command
saves objects modified during the save. The -after argument takes a value which is
the number of minutes save waits before performing an additional backup.
When you use the -after argument, the save command first performs initial backup.
Then, after number minutes, the save command performs a backup of objects
modified since the last backup.
Never give this argument without also giving -backup. If
you do not give -backup, the date-time-saved values for
saved objects are not updated.

To save all the objects on d01 modified during the incremental save, and update the
date-time-saved value of each object saved, issue the following command.
save %s1#tape.1.0 #d01 -after 30 -modified_since_saved
-backup -volume_ids V1
Objects modified during this save are resaved after 30 minutes.

The Objects Arguments


The save command has three arguments that indicate which objects to save, and one
argument that indicates which objects not to save.
You can specify objects to be saved in the following ways.
Backing Up Data

2-7

Logical Backup: The save Command


Name them in the path_names argument. (This argument also accepts star

names.)
List them in a control file, and then give the path name of the file in the

-control_file path_name argument. List each object on a separate line. Star


names are not allowed in control files.
Give the -all_disks argument. This argument saves all objects on all disks in a

system. Only a privileged process can give this argument. (See the
recommendations regarding -all_disks later in this section.)
If you do not give any of these arguments, only the objects in the current directory are
saved.
Saving All Objects in the Current Directory
To save all objects in the current directory, issue the following command.
save %s1#tape.1.0 -backup -volume_ids V1
Saving All Objects on a Disk
To save all objects on d02, issue the following command.
save port1 #d02 -backup -volume_ids V1 V2
See Performing a Complete Save of an Entire Disk,
earlier in this chapter, for information about attaching the
port and mounting the tapes for multivolume saves.

Saving All Objects on All Disks


To save the contents of all the disks in a system, choose any one of these four
methods. The fourth is recommended.
Use the -all_disks argument. This creates a single tape file that often spans

many tapes. If a restore operation becomes necessary for an entire disk, it may be
time consuming to locate the top directory for that disk.
Save each disk with a separate save command. This simplifies restoring any one

disk but wastes tape space.


Save the contents of each disk to a separate tape drive. This reduces the time of

saves by half, if you are using at least two disk drives and two tape drives. This is
called a parallel save.
Save the disks in sets, with each set of disks grouped to fit on one tape or a set of

tapes. You waste little tape space, and you have a manageable set of tapes for
restoring each disk from its top directory.
To save all the objects on all disks in the system, issue the following command.
2-8

VOS System Administration: Backing Up and Restoring Data (R285)

Logical Backup: The save Command

save port1 -all_disks -backup -volume_ids V1 V2 V3 V4 V5


See Performing a Complete Save of an Entire Disk,
earlier in this chapter, for information about attaching the
port and mounting the tapes for multivolume saves.
Saving All Objects in a Specified Path Name
To save all the objects in the Sales and Accounting directories, issue the following
command.
save %s1#tape.1.0 %s1#d01>Sales %s1#d02>Accounting -backup
-volume_ids V1
Saving All Objects Listed in a Control File
To save files and directories scattered throughout the system, the most effective way
is to list the objects in a control file. To save all the objects listed in a control file named
libraries, issue the following command.
save %s1#tape.1.0 -control_file libraries -volume_ids V1
The file libraries names two directories and a file; each object is listed on a
separate line. The file looks like this:
%s1#d01>system>command_library
%s1#d01>system>object_library
%s1#d01>doc_lists>library_list
Specifying Objects Not to Save
The -do_not_save name argument specifies one or more objects not to save. In
most cases, you supply one or more star names. If you do not want to save temporary
files, you must use the -do_not_save argument.
To save all objects on all disks in a system, except those objects beginning with an
underline (_) or ending in .temp, .mail, or .backup, issue the following command.
save port1 -all_disks -do_not_save _* *.backup *.mail *.temp
-backup
-volume_ids V1 V2 V3
See Performing a Complete Save of an Entire Disk,
earlier in this chapter, for information about attaching the
port and mounting the tapes for multivolume saves.

The Log Arguments


Whenever you perform logical backup, use the save command arguments that create
log files. There are two types of log files which save can create:

Backing Up Data

2-9

Logical Backup: The save Command


backup log files
tape log files.

If possible, save all log files online as it greatly simplifies the process of finding the
location on the save tape of an object inadvertently deleted. If you save these files
online, the backup plan you develop should include a schedule for periodically deleting
log files from tape when they become unnecessary.
If your system does not have enough storage to save the logs online, print at least one
copy of each log before deleting it, and keep the copies in a safe location.

Backup Log Files


The backup log file contains information about each object saved. If you need to restore
a file or directory, you can use the information in the log to locate the most current tape
on which the object is saved. See the excerpt from a backup log and information about
using backup logs in the section Backup Logs in Chapter 4.
To create a backup log file called bu_log of a consolidated save of disk d01, issue the
following command.
save %s1#tape.1.0 #d01 -date 95-4-16_18:00:00 -backup
-volume_ids V1 -log bu_log
Tape Log Files
The tape log file contains the volume IDs of the save tapes. See the example of a tape
log file and information about using tape logs in the section Tape Logs in Chapter 4.
To create a tape log file called t_log_1 of a complete save of disk d01, issue the
following command.
save %s1#tape.1.0 #d01 -backup -volume_ids V1 -tape_log
t_log_1

Using Tapes
This section describes what you need to know about tapes and tape drive use before
attempting to do a save.
Preparation
Before issuing the save command you must load a tape onto the tape drive.
Subsequently, whenever you need to load a new tape, the save command prompts
you. Be sure that each tape is created with ANSI standard labels, has a name that is
2-10

VOS System Administration: Backing Up and Restoring Data (R285)

Logical Backup: The save Command

no more than six characters long, and has a write ring inserted. For information about
loading tapes, see the chapter on tape processing in the VOS Commands Users
Guide (R089), or VOS Tape Processing Users Guide and Programmers
Reference (R052).

Backing Up Data

2-11

Logical Backup: The save Command

Specifying Tape Volume IDs


You must supply the volume ID of each tape volume used while performing a save.
There are several ways to do this.
You can give one or more volume IDs with the -volume_ids argument of the

save command.
You can give each volume ID as the save command prompts you for it. The

command issues a prompt each time it needs to write an additional tape for which
it has no ID.
You can supply the volume ID with the mount_tape command before giving the

save command.
You do not need to give the mount_tape or attach_port commands when doing
logical backup, since the save command can mount each tape implicitly. However, the
save command accepts tapes that are already mounted so that you can issue more
than one save command using the same tape volume. If you specify a volume ID
different from the volume ID of the mounted tape, the system sends you a message to
inform you and indicates possible solutions.
To save all objects in the current directory to tapes with the volume IDs V1, V2, and V3,
and to create both backup and tape log files, issue the following command.
save port3 -backup -volume_ids V1 V2 V3 -log bu_log -tape_log
t_log_1
See Performing a Complete Save of an Entire Disk,
earlier in this chapter, for information about attaching the
port and mounting the tapes for multivolume saves.
When saving to a multivolume set of tapes, the save command writes the volume ID
of the new tape on the preceding tape, before it saves the next tape. This enables the
restore command to determine the next tape in a multivolume set of save tapes.
Do not load a tape with a different volume ID from the ID you supplied to the save
command and that it wrote on the preceding tape. The save command accepts the
loaded tape, but the differing IDs will cause confusion during a restore operation.
When planning your system backup process, you may want to create tape volumes on
all of the tapes to be used for backup. You do this with the create_tape_volumes
command or with the create_volume argument to the mount_tape command, both
of which are described in VOS Commands Reference Manual (R098). This provides
some assurance that only those tapes designated as backup tapes are used for
backup.
The operating system considers all the data it writes on a tape volume to be a tape file.

2-12

VOS System Administration: Backing Up and Restoring Data (R285)

Logical Backup: The save Command

The save command saves variable-length logical records. Performing a save to tape
stores them in the VBS (variable blocked spanned) tape format, in which
variable-length logical records are mapped into fixed-size physical tape records. A
single logical record can span one or more tape records. See the VOS Tape
Processing Users Guide and Programmers Reference (R052) for more information on
tape formats.

Restarting a Save
This section describes how the save command handles a save interrupt and provides
step-by-step instructions on how to restart the save.
Occasionally, an unrecoverable tape error or a tape offline error interrupts a save.
Such an event does not require you to restart the save from the beginning. Instead, you
can restart it at an intermediate point using a new tape reel and, if desired, a different
tape drive.
In responding to a save interrupt, you will not necessarily
know whether the problem is caused by a bad tape reel or
a bad tape drive. You should first attempt to restart the
save using a new tape reel. If this does not resolve the
problem, you should next try restarting the save on the
current tape drive one or more times. If still not successful,
try restarting the save on a different tape drive.
The Resave Log File
During its execution, the save command creates a temporary file called the resave log
file in which it records the names of the objects being saved. This file is named with a
unique string (created by the operating system) and the suffix .this_tape. It is
located in the directory from which you invoked the save command and, in most cases,
is automatically deleted when the command completes. (If it is not deleted
automatically, delete it manually.)
If either an unrecoverable tape error or a tape offline error interrupts a save, the save
command can use the contents of the resave log file to restart the save from an
intermediate point.

Backing Up Data

2-13

Logical Backup: The save Command

Responding to a Save Interrupt


When the save command encounters an unrecoverable error or a tape offline error,
save reports the error, then performs the following steps.
1. The save command displays the following message.
Tape drive tape_drive_name or reel on drive is bad.
You can supply a new reel if you think the reel is bad.
You can change drives if you think the drive is bad.
Do you want to use another tape drive?

(yes, no, stop)

You can respond by typing yes, no, or stop.


a. If you suspect that the tape drive is bad and want to restart the save using a
new tape drive, type yes. The save command displays the following prompt.
New tape drive name?
Type the device name of a tape drive on your system. The save command
then attempts to use the specified drive for the remainder of the save.
b. If you suspect that the reel is bad and want to restart the save using the current
tape drive, type no.
c. To cancel the save rather than restart it, type stop. The command returns the
following message and stops execution.
End of save.
save: Fatal error.

Save aborted before completion.

If you cancel the save but still want to back up the


remaining objects, you must restart the save from the
beginning.
2. If you have chosen to restart the save, the command now provides the following
instructional message.
Load tape reel volume_ID on drive tape_drive_name
The value of volume_ID is the volume ID of the reel on which the error occurred.
If you specified a new tape drive (Step 1a), the value of tape_drive_name is the
device name of that tape drive. Be sure that a tape reel is loaded on the drive.
If you chose to use the current tape drive (Step 1b), the value of
tape_drive_name is the name of the drive being used when the save was
interrupted. In that case, remove the reel you suspect is bad, and physically mount
a new reel. Mark the old reel as bad so that it can be checked later.
3. The save command now mounts the new tape reel for you and asks the standard
questions associated with the mounting of a tape.
2-14

VOS System Administration: Backing Up and Restoring Data (R285)

Logical Backup: The save Command

After the tape reel is mounted, the save command continues saving objects
beginning with the first object on the tape reel it was using when the interrupt
occurred.

Using the T401/T402 Tape Drive for Multitape Saves


TheT401/T402 tape drive lets you use more than one save tape without any
intervention.
You can load one or two 10-tape cartridge magazines in the drive. The basic steps in
this procedure follow. For a complete description of how to perform a save using the
T401/T402 tape drive, see T401/T402 Tape Drive Users Guide (R315).
The T402 tape drive supports data compression. The
compressibility of data may vary widely. If you are using
a T402 tape drive, each cartridge will typically contain two
to three times the equivalent of uncompressed data.
However, some data patterns may compress slightly or
not at all.
1. Determine how many cartridges you need. Use the display_disk_usage
command to determine how much disk space is used by the directories to be
saved. There are about 240 disk blocks in a megabyte. Each T401 cartridge holds
about 200 megabytes of data, and each ten-cartridge magazine holds two
gigabytes of data. This assumes that 28,000 byte blocks (the default) are used. A
-blocking of 1 with the save command, which generates 4,096 byte blocks,
results in a capacity of 120 megabytes per cartridge. Although a T402 cartridge
also holds about 200 megabytes of data, it can be equal to 400 to 600 megabytes
of uncompressed data.
2. Set the parameters for the monitor terminal: set_terminal_parameters
-pause_lines 0.
3. Attach a port: attach_port port_name tape_drive_path_name. Be
prepared to specify the number of tapes you are going to initialize and whether the
cartridges are to be overwritten. The volumes are created unattended by default.
Create the volume for each tape cartridge: create_tape_volumes d02 V1 10.
The command increments the volume ID for each cartridge by one. When the
volumes have been created, a READY U prompt appears on the tape drives display
panel. For more information on the create_tape_volumes command, refer to
the VOS Commands Reference Manual (R098).
It takes about a minute to create each volume.
4. Load the magazine with the tape cartridges (stacked in the order of
their volume IDs). Issue the following command to start an unattended save:
save tape_device_or_port_name -all_disks -volume_ids V1 V2 V3
V4 -backup -unattended. The operating system displays information on the
monitor terminal about the save while the save command is in progress.
Backing Up Data

2-15

Physical Backup: The dump_disk Command

5. When the save is over, reset the -pause_lines argument of the


set_terminal_parameters command to its normal value.

Physical Backup: The dump_disk Command


Physical backup uses the dump_disk command to do a block-by-block dump to tape
of all allocated blocks (blocks that are in use) on a logical disk. This is referred to as
dumping. You can recover the data backed-up with dump_disk by using the
reload_disk command.
A physical backup is faster than a logical backup. However, the physical dump and
reload procedure permits only a complete reload of the disk contents with no selective
restoration of files or directories.
The dump_disk command makes multiple passes over the disk contents to get a
consistent copy of each disk block. The first pass dumps all allocated disk blocks. Each
subsequent pass dumps all disk blocks modified since the beginning of the previous
pass. When a pass is made and no modified blocks are found, the dump is terminated.
Generally, a disk that is being modified can be dumped in only a few passes, since the
disk can be dumped more quickly than it can be modified.
The dump_disk command does not update the date-time-saved values of objects on
the disk. You do not have to issue either the attach_port or the mount_tape
commands before invoking dump_disk when you specify the tape drive in the
dump_disk command.

The dump_disk Arguments


The dump_disk command has two required arguments.
tape_device_or_port_name is the name of a tape device or a port attached to

a tape drive. The tape drive can be located anywhere within the local or wide area
network.
disk_name is the name of the disk whose contents are to be written to tape. The

disk must be located on the current module.


In addition, dump_disk has an optional argument, -pause. With this argument, when
the operating system completes the first pass over the disk, it pauses and displays a
message telling you to suspend disk activity. You can then broadcast a message
asking users to write out their files. The purpose of this argument is to allow the
operating system to get a consistent copy of every disk block while suspending disk
activity only for a very short time.

2-16

VOS System Administration: Backing Up and Restoring Data (R285)

Physical Backup: The dump_disk Command

Dumping the Master Disk


When executed on a master disk, the dump_disk command puts a copy of the
operating system on the tape before copying the rest of the disk contents. The result is
a boot tape that can be used for a manual tape boot of the module. Always have such
a tape available. Whenever a new release of the operating system is installed, do a
physical backup of the master disk on each module to create an up-to-date boot tape.
You can also use the copy_kernel command to save a copy of the operating system
to tape. See VOS System Administration: Disk and Tape Administration (R284) for
information on this command.
To dump the contents of a master disk named d01, issue the following command.
dump_disk %s1#tape.1.0 d01 -pause
You should also do a periodic physical backup of the master disk on each module to
ensure that you have current copies of the files in the (master_disk) directory.
If you rename a boot disk (as described in VOS System
Administration: Disk and Tape Administration (R284)) you
must create a new boot tape. When you boot from tape,
the disk name on the boot tape must be consistent with
the name in the boot disks label. See VOS System
Administration: Starting Up and Shutting Down a Module
or System (R282) for information about performing a tape
boot.

Backing Up Data

2-17

Physical Backup: The dump_disk Command

Dumping All the Disks in a Module


On a module running with nonduplex disks, you should perform frequent physical
backups of all disks.
On a module running an application with infrequent file modifications, you may decide
that physical backup provides sufficient protection and that logical backups are
unnecessary. On modules with less stable applications, include physical backup of all
disks as part of the backup schedule, even though you also perform regular logical
backups. See Chapter 3 for information about planning a backup schedule.
To perform a physical backup of the disks d01, d02, and d03, issue the following
commands.
dump_disk
dump_disk
dump_disk

%s1#tape.1.0
%s1#tape.1.0
%s1#tape.1.0

d01
d02
d03

-pause
-pause
-pause

Using the T401/T402 Tape Drive with the dump_disk Command


The T401/T402 tape drive lets you use more than one save tape without any
intervention.
You can load one or two 10-tape cartridge magazines in the drive. The basic steps in
this procedure follow. For a complete description of how to use the dump_disk
command with the T401/T402 tape drive, see T401/T402 Tape Drive Users
Guide (R315).
The T402 tape drive supports data compression. The
compressibility of data may vary widely. If you are using
a T402 tape drive, each cartridge will typically contain two
to three times the equivalent of uncompressed data.
However, some data patterns may compress slightly or
not at all.
1. Determine how many cartridges you need. Use the display_disk_usage
command to determine how much disk space is used by the directories to be
saved. The nature of the recording media causes block size to have an impact on
tape storage. Since the block size for the dump_disk command cannot be altered,
each cartridge can hold only 120 megabytes. Although a T402 cartridge also will
hold 120 megabytes of data, it can be equal to 240 to 360 megabytes of
uncompressed data. Make sure that none of the tapes are write protected. Insert
the needed cartridges in a magazine or magazines.
2. Set the parameters for the monitor terminal: set_terminal_parameters
-pause_lines 0.
3. Load the magazine with the tape cartridges. The -compression and
-unattended arguments can now be used with the dump_disk command. See
2-18

VOS System Administration: Backing Up and Restoring Data (R285)

Using Command Macros for Backup

the VOS Commands Reference Manual (R098). Issue the following command to
start an unattended dump_disk command: dump_disk
tape_device_or_port_name -unattended. The operating system displays
information on the monitor terminal about the process while the dump_disk
command is in progress.
4. When the save is over, reset the -pause_lines argument of the
set_terminal_parameters command to its normal value.

Using Command Macros for Backup


You can create command macros that execute the backup procedures with a single
command. For example, you can create macros that reference files containing lists of
the tape volumes to be used, execute the save command with appropriate arguments,
and then perform functions such as renaming log files from previous backups and
deleting them after a certain period of time.
See VOS Commands Users Guide (R089) for information about creating command
macros.

Backing Up Data

2-19

Using Command Macros for Backup

2-20

VOS System Administration: Backing Up and Restoring Data (R285)

Chapter 3
Backup Operations

3-

This chapter discusses some of the issues you need to consider when you plan a
backup. These issues include:
designing a backup schedule
giving the operator access rights
keeping backup records.

Planning a Backup Schedule


Design the backup schedule for your system according to how the system is used. If a
module runs a very stable application with infrequent file modifications, you may decide
on a backup schedule that involves only periodic physical dumps of all disks on that
module. In this case, all you need to do is give the dump_disk command for each
logical volume. An example of this command sequence is given in Dumping All the
Disks in a Module in Chapter 2.
For any other type of application, include regular logical backups, and periodic physical
backups of the master disk on each module. The frequency of the backups and the type
of backup to use should depend upon:
how frequently the objects on the system are modified
what amount of system resources can be allocated for the process performing

backups.
This chapter gives two sample schedules. The first uses three modes of logical backup,
and the second combines logical and physical backup.

Schedule 1
For a module on which many files are regularly modified, frequent backups are
essential. Conserving system resources is important, but it is less important than the
ability to restore individual objects when they are accidentally damaged or deleted. This
schedule calls for:

Backup Operations

3-1

Planning a Backup Schedule


Daily incremental saves. Each backup saves all objects modified since the last

backup. This command is to be executed daily.


save port1 -all_disks -modified_since_saved -backup
-volume_ids V1 V2 V3 -log log -tape_log tape_log
Weekly consolidated saves. Each backup saves all objects modified since the

beginning of the week. Once a weekly save is made, the tapes used for daily saves
can be reused. This command is to be executed weekly.
save port1 -all_disks -modified '95-04-03 12:00:00'
-backup -volume_ids V1 V2 -log log -tape_log tape_log
Monthly complete saves. Each backup saves all objects on all disks. Once a

monthly save is made, the tapes used for weekly saves can be reused. This
command is to be executed monthly.
save port1 -all_disks -backup -log log -tape_log tape_log
-volume_ids V1 V2 V3
Bimonthly dump of each master disk. The command is to be executed every two

months for each master disk. Save these tapes for at least four months before
reusing them. The -pause argument lets you notify users to write out all files. The
-compression and -unattended arguments can now be used with the
dump_disk command. See the VOS Commands Reference Manual (R098).
dump_disk port1 d01 -pause

Schedule 2
This schedule is for a module on which data inquiries are more frequent than file
updates, meaning that daily backups are not essential. The schedule conserves
system resources by combining logical and physical backups, but it takes the risk that
an accidentally deleted file may not yet have been saved on a weekly logical save tape.
The schedule calls for:
Consolidated save. Each backup saves all objects modified during the last two

weeks. The -compression and -unattended arguments can now be used with
the save command. See the VOS Commands Reference Manual (R098). The
command is:
save port1 -all_disks -modified '95-03-24 12:00:00'
-backup -volume_ids V1 V2 V3 -log log -tape_log tape_log
Monthly physical dumps. Each backup saves all objects on all disks, but does

not save directory structures. The command is dump_disk, repeated for each
disk.

3-2

VOS System Administration: Backing Up and Restoring Data (R285)

Restricting Operators to Backup and Restore

Restricting Operators to Backup and Restore


Both the save command and the restore command (documented in Chapter 5 of this
manual) have a -backup argument, and in both cases a user must be privileged to use
the argument. However, you may want to assign backup and restore operations to a
user whom you do not want performing other privileged operations. In this case, use
the following procedure to register the user under multiple user names in the
registration database and, for each of the users privileged registrations, to edit the
users start_up.cm file.
1. For the users first user name, give the registration_admin command and
select the Add New User option from the menu (or if the user is already registered
under this name, select the Update User Info option). In the second of the two
screen forms that follow the menu, be sure that both the Privileged and the
Must Have Start Up Program fields are set to no (the default when registering
a new user).
2. To register each of the users other user names, select the Add New User option
from the registration_admin commands menu. But for each of these user
names, set both the Privileged and the Must Have Start Up Program fields
to yes.
3. Tailor the start_up.cm file for each of the users privileged user names so that
he or she is restricted to backup or restore while logged in as privileged. For
example, the startup file could begin executing a save or restore command, and
then log the user out when the execution is completed.
For more information on registration and access, see VOS System Administration:
Registration and Security (R283).

Keeping Backup Records


Keep accurate records of all backup procedures performed. Tapes used for backup
should be marked clearly with the following information:
the date of the backup
the type of backup (physical dump, logical save, or partial logical save with

specified limits)
the names of the disks backed up on each tape.

You may also want to keep a handwritten log of recent backups for reference if a disk
or module fails.
The next chapter outlines the steps in recovering the contents of a disk. The first step
is to determine when the most recent backups of the disk were performed. If you have
the information recommended here, you will have no trouble determining which tapes
to use for disk recovery.
Backup Operations

3-3

Keeping Backup Records

To verify that the contents of a backup tape can be read and restored, issue the
verify_save command, described in VOS Commands Reference Manual (R098).
You should also be aware that tapes used repeatedly for backup (or for any other
purpose) may eventually become unreadable. The Stratus tape hardware attempts to
read each tape block as soon as it is written, and makes an entry to the
syserr_log.(date) file if the attempt is unsuccessful. Therefore, you can check this
file for information about the condition of your backup tapes.

3-4

VOS System Administration: Backing Up and Restoring Data (R285)

Chapter 4
Restoring Data from Logical
Backups

4-

This chapter describes how to use the restore command to retrieve data from a
logical backup, and how to use the reload_disk command to retrieve the contents
of a disk from a physical backup. This chapter also contains information about the use
of pipe files to move a directory from one location to another.
Read the information about logical volumes in VOS System Administration: Disk and
Tape Administration (R284) before working with either of the retrieval commands. (The
restore command operates on logical volumes or portions of a logical volume, and
the reload_disk command operates on entire logical volumes.)

Retrieving Backed-Up Data: The restore Command


The operating system provides two commands, restore and restore_object, that
restore data to a specified place in the directory hierarchy. The data must have been
saved with either the save command, described in Chapter 5, or the save_object
command, described in VOS Commands Reference Manual (R098).
The restore_object command restores only one object, although this can be the
entire directory hierarchy on a disk or tape. The restore command is more complex.
It can take more than one name of an object to be restored, and it has several
arguments that control various aspects of the restoration process. This section
discusses only the restore command, although you can use restore_object in
some situations like those described here. For complete information about restore,
see Chapter 5. For complete information about restore_object, see VOS
Commands Reference Manual (R098).
The terms save path name, common path name, and the restore path name referenced
in this chapter are defined in Chapter 5. This chapter assumes that you are restoring
objects from a tape and not from a disk file.
The restore command has one required argument,
tape_device_or_port_name, which is the name of a tape device or a port to be
attached to a tape drive. (The command can also restore objects saved on a disk.
However, this manual describes only restoring from tape, since normally you save to
and restore from tape.)
Restoring Data from Logical Backups

4-1

Retrieving Backed-Up Data: The restore Command

There are three ways to use this command:


by invoking attach_port and mount_tape, followed by restore.
by invoking an automatic mount. Invoke the attach_port command, followed

by restore. Using the restore command automatically eliminates the need for
explicitly mounting and dismounting the tape.
by invoking an implicit attachment. Invoke restore followed by the name of the

tape device attached to the module. Using restore implicitly eliminates the need
for explicitly attaching the port, mounting the tape, dismounting the tape and
detaching the port.
If you give a device name, and a port is already attached,
that port is used. Since this is not an implicit port
attachment, you need to explicitly detach the port after the
tape command is finished.
You must supply the ID of the first volume of a set of save tapes to be used for the
restore operation. You can give the ID value either in the -volume_id argument or
when restore asks you for it.

The Steps in Data Retrieval


To restore the contents of a save tape, V1, to the directory named Clark, perform the
following steps.
1.

Load the tape on a tape drive connected to %s1#m1. See VOS Tape Processing
Users Guide and Programmers Reference (R052) for information on using tape
drives.

2. Issue the verify_save command from a terminal connected to %s1#m1 to


determine whether the save tape can be read and restored properly. The
-unattended argument can now be used with the verify_save command. See
the VOS Commands Reference Manual (R098).
3. Issue the following command from a terminal logged in to %s1#m1:
restore %s1#tape.1.0 >Accounting>Clark>* -volume_ids V1
-same_place
The following prompt appears on your screen.
Begin restore of save dated: 95-04-06 6:00:01 EDT
Source is: %s1#d01>Accounting>Clark

When the restore is complete, the operating system sends the terminal the
following message.
End of restore, last saved object:
4-2

95-04-06 6:45:43 EDT

VOS System Administration: Backing Up and Restoring Data (R285)

Retrieving Backed-Up Data: The restore Command

4. Unload the tape.


These are the basic steps in a restore. The restore command can attach the port and
mount the tape without user intervention. The restore command arguments let you
select which objects on a tape to restore depending on their location in the directory
hierarchy.
If you begin a restore operation with any tape other than the first tape of a multitape
backup, restore issues a warning message and prompts for a common path name
for the tape. When you are working with a multitape backup, mount the tapes by
invoking attach_port and mount_tape explicitly.
If restore encounters an unreadable portion of tape while attempting a restore, it
skips ahead to the next readable record, continues the restore and displays a message
about lost data. A summary of the lost data is logged for use after the restore is
complete.
If you cannot restore objects from the most recent save
tapes, you can try restoring the objects from older save
tapes.

Selecting the Objects to Restore


The restore command has two arguments, object_names and -source, that
specify which objects to restore. You can give either, neither, or both of these objects
arguments.
The restore command has additional arguments that further define which objects to
restore. These arguments, which modify the objects arguments, are discussed later in
this chapter.
You can specify to be restored:
objects with save path names that match the names you give in the

object_names argument.
objects contained in a directory that you name in the -source string argument.

For the restore operation to succeed, the value of string must combine with the
common path name of the objects on the save tape to form the save path name of
some saved object. If the common path name is the null string, and you do not give
a path name for the string value, restore will ask you for a common path name.
objects with save path names that meet the conditions of both object_names and

-source string. To do this, give both of the objects arguments.


all objects on the save tapes. To do this, give neither of the objects arguments.

See the arguments table of the restore command description in Chapter 5 for a
summary of the objects arguments and the modifying arguments.
Restoring Data from Logical Backups

4-3

Retrieving Backed-Up Data: The restore Command

Restoring Objects from a Specified Directory


To restore all the objects in the Sales directory, issue the following command.
restore %s1#tape.1.0 -source Sales -same_place -backup
-volume_id V1
The -same_place argument restores the Sales directory to the same location in the
directory hierarchy where it had been at the time it was saved. The -backup argument
gives you access to overwrite the existing object on the disk, restores the saved ACLs
of the object, and retains the initial date-time-saved value of the object. The
-volume_id argument specifies the volume ID of the tape to be restored. These
arguments are discussed in detail later in this chapter.
Restoring Objects from Multiple Directories
To restore all the objects in the Smith and Clark directories, issue the following
command.
restore %s1#tape.1.0 #d01>Sales>Smith #d01>Sales>Clark
-backup -volume_id V1
If the objects were not saved with a common path name, restore asks you to supply
one.
Restoring Specified Objects
To restore the specified objects in the directory %s1#d01>Accounting, issue the
following command.
restore %s1#tape.1.0 Clark>reports ledger -source
%s1#d01>Accounting -backup -volume_id V1
Restoring All Objects on a Tape
To restore all the objects on the save tape, issue the following command.
restore

%s1#tape.1.0

-backup

-volume_id V1

Modifying the Objects Arguments


The restore command has three modifying arguments (-replace, -first, and
-trim) that deal with special circumstances encountered while determining which
objects to restore. When you give one of these arguments, it changes the way the
restore command normally determines which objects to restore. In this way, these
arguments modify the objects arguments.
Table 4-1 shows the circumstances, the default responses, and how these modifying
arguments change the default responses.

4-4

VOS System Administration: Backing Up and Restoring Data (R285)

Retrieving Backed-Up Data: The restore Command

Table 4-1. The Modifying Arguments to the restore Command


Circumstance

Default Response

Modifying Argument and


Response

A file in the destination directory


with the same path name as a
file to be restored. A link in the
destination directory with the
same path name as a link to be
restored.

Do not restore the file or link;


issue a warning message,
indicating that the file or link
was restored in a temporary
file.

-replace
Restore the file or link. To do
this, restore must replace
(overwrite) the file or link in the
destination directory with the
saved file or link.

More than one copy of an object


on a save tape.

Restore the latest version of


the object.

-first
Restore the earliest version of
the object.

Restoring data from multiple


backups.

Restore all objects from


backups, including those since
deleted.

-trim
Delete objects deleted by
users, restoring the directory to
its state at the time of the last
backup.

You cannot give both the -first and -trim arguments


in the same command.
The -replace argument overwrites an existing object on the disk with the object on
the tape. To replace the version of >Jones>programs that is on the disk by the
version that is on the tape, issue the following command.
restore %s1#tape.1.0 >Sales>Jones>programs -replace
-volume_id V1
The -first argument restores the earliest saved version of objects. To restore the
earliest version of the objects in the directory %s1#d01, issue the following command.
restore

%s1#tape.1.0

-source %s1#d01

-first

-volume_id V1

The -trim argument deletes objects subsequently deleted by users. This argument is
useful when you are restoring data from multiple backups. To suppress restoration of
deleted files, issue the following command.
restore

%s1#tape.1.0

-source %s1#d01

-trim

-volume_id V1

Both the -replace and -trim arguments override the safety switch and/or expiration
date, if set, on any object to be replaced or deleted. This functionality is necessary
when restoring an incremental save.

Restoring Data from Logical Backups

4-5

Retrieving Backed-Up Data: The restore Command

Using the -backup Argument


The -backup argument is a privileged argument that allows you to overwrite objects
to which you do not have access, restores the objects with the attributes that they have
on the save tape, and performs some additional functions. See the restore command
in Chapter 5 for a complete list of the functions performed by -backup.
The -backup argument performs the functions of the -restore_acls and
-replace arguments. The -backup argument overrides the default no values of
these two arguments, so you cannot give either of these arguments in the same
command with -backup. You also cannot give both the -first and -backup
arguments in the same command, since -backup restores the latest version of an
object. When restoring an entire disk, always give the -backup argument. In other
cases, the -backup argument is optional.
The -backup argument changes the determination of which objects to restore in the
following ways.
-backup temporarily overrides normal access requirements, so that your process

can overwrite objects to which it normally does not have access.


-backup performs the function of the -replace argument.
-backup also restores all ACLs of objects saved.

To restore the objects in the directory %s1#d01, including any saved file or link with the
same path name as a file or link in the destination directory, issue the following
command.
restore

%s1#tape.1.0

-source %s1#d01

-backup -volume_id V1

See the arguments tables in the restore command description in Chapter 5 for a
summary of the objects arguments and the modifying arguments. See the section
Restricting Operators to Backup and Restore in Chapter 3 for information about how
you can restrict a user from giving privileged commands while allowing him or her to
use the privileged -backup argument.

Restoring Objects to Specified Locations


The restore command has two destination arguments, -destination and
-same_place, that indicate where in the directory hierarchy to place the objects it
restores. You can give either or neither of these arguments, but you cannot give both.
You can specify:
a certain directory by using the -destination argument.
the location in the hierarchy defined by the objects path name. This is the location

of the object when it was saved. You do this with the -same_place argument.
4-6

VOS System Administration: Backing Up and Restoring Data (R285)

Retrieving Backed-Up Data: The restore Command


the current directory. The restore command uses the current directory by default

when you give neither of the destination arguments.


The -replace argument and the replace function of the -backup argument assume
that the destination of the restored objects is a directory that already contains data.
Giving -replace or -backup (which implies -replace) runs the risk of overwriting
objects that should not be overwritten; but omitting either argument runs the risk of not
restoring objects that should be restored. You can avoid both of these risks by creating
an empty directory (with the create_dir command) as the destination for the
restored objects. Then you can do either of the following.
specify the new directory in the -destination argument
change from your current directory to the new directory and give no destination

argument.
Once objects are restored to disk, you can move them to the appropriate locations in
the directory hierarchy.
You cannot use this method with the -same_place argument. With -same_place,
you always run one or the other of the risks outlined above.
Restoring Objects to a Specified Directory
The following command restores the specified object to the directory restore_dir.
restore %s1#tape.1.0 -source Sales>sales>ledger
-destination Sales>sales>restore_dir -backup -volume_id V1
Restoring Objects to the Current Directory
The following command restores the specified objects to the current directory.
restore

%s1#tape.1.0

Smith>*.mail

-backup

-volume_id V1

Restoring Objects to Their Previous Locations on Disk


The following command restores the specified directory to the location %s1#d01 in the
directory hierarchy.
restore %s1#tape.1.0 -source %s1#d01 -same_place -backup
-volume_id V1

Restoring Data from Logical Backups

4-7

Retrieving Backed-Up Data: The restore Command

Miscellaneous Arguments
The restore command has the following additional arguments.
-list
-pack
-trim
-restore_acls
-no_restore
-extent_new_size
-extent_num_records
The -extent_new_size and -extent_num_records requests enable you to
change the size of the extents and the number of extents for extent-based files that you
restore.
The -restore argument set to its no value (-no_restore in the command line form)
is meant to be used with -list and -same_place. When you use these arguments
together, the restore command does not perform a restore operation, but instead
displays a list of the objects designated by the objects arguments. These arguments
can be used to create a backup log for a tape volume, as described in the next section.
Give the -pack argument if the object contains deleted records and you want to
recover the storage allocated to those records. Do not use -pack on fixed files, server
queue files, message queue files, or files with separate-key indexes.
1. When the -pack argument is used, the file being
restored is first restored to a file with a different name
and is then copied into the actual file requested, thus
requiring twice as much disk space. If this causes a
disk full condition, the process will abort.
2. The -pack argument makes the restore command
run more slowly.
Give the -list argument to display a list of objects as they are restored. Leave the
argument at its default setting of yes (by omitting -no_restore in the command line
form).
The remaining arguments are described in detail in the the description of the restore
command in Chapter 5.

Log Files
The save command provides two arguments, -log path_name and -tape_log
path_name, that create log files, which are used to locate saved objects on the tape.
This section describes the log files and how to use them.
4-8

VOS System Administration: Backing Up and Restoring Data (R285)

Retrieving Backed-Up Data: The restore Command

Backup Logs
A backup log file contains:
the volume ID of each tape used to save objects.
the common path name (which can be the null string) of the objects saved on that

tape. See the save command in Chapter 5 for a definition of common path name.
for every object saved, the date and time that the object was saved, the type of

object, and the objects path name.


Sample Backup Log
This is an excerpt from a backup log file, showing the beginning of the log for a logical
backup to tape performed on March 3, 1995. The volume ID of the tape is V2.
95-03-08 18:02:05 EDT
%s1#tape.1.0 > V2 >
save.95-03-08_18:01:40_EDT
95-03-08 18:02:05 EDT:
Common Path Name =

start full save to %s1#tape.1.0.

95-03-08 18:02:06 EDT


DIR
%s1#d01>Sales
95-03-08 18:02:07 EDT
file
%s1#d01>Sales>profile
95-03-08 18:02:09 EDT
file
%s1#d01>Sales>schedules
95-03-08 18:02:09 EDT
DIR
%s1#d01>Accounting
95-03-08 18:02:11 EDT
file
%s1#d01>Accounting>furniture
95-03-08 18:02:13 EDT
file
%s1#d01>Accounting>manuals
95-03-08 18:02:14 EDT
file
%s1#d01>Accounting>supplies
95-03-08 18:02:16 EDT
file
%s1#d01>Accounting>forms
95-03-08 18:02:17 EDT
link
%s1#d01>pdd
95-03-08 18:02:17 EDT
DIR
%s1#d02>Sales_support
95-03-08 18:02:18 EDT
file
%s1#d02>Sales_support>product_briefs
95-03-08 18:02:18 EDT
file
%s1#d02>Sales_support>training
95-03-08 18:02:18 EDT
file
%s1#d02>Sales_support>schedules
Tape Logs
A tape log file contains for each tape volume listed:
the common path name (which can be the null string) of the objects saved on that

volume. See the restore command in Chapter 5 for a definition of common path
name.
the name of each top disk directory that has some contents saved on the volume,

and the time that the save began for that directory.
Restoring Data from Logical Backups

4-9

Restoring an Object Other Than the Top Directory of a Disk


the time that saves began and the time that saves ended on the volume.

Sample Tape Log


This is the tape log for an incremental backup performed on April 27, 1995. The tape
volume IDs are V1 and V2.
95-04-27 18:21:57 EDT: start incremental backup
(-modified_since_saved)
to %s1#tape.1.0.
Common Path Name =
95-04-27 18:21:57
95-04-27 18:45:56
95-04-27 18:53:15
95-04-27 18:21:56
> V1 >
+save.95-04-27

EDT
EDT
EDT
EDT =>

DIR
%s1#d01
DIR
%s1#d02
DIR
%s1#d03
95-04-27 19:00:40 EDT

%s1#tape.1.0

95-04-27 19:09:34 EDT: start incremental backup


(-modified_since_saved)
to %s1#tape.1.0.
Common Path Name =
95-04-27 19:09:34 EDT
DIR
%s1#d04
95-04-27 19:37:40 EDT
DIR
%s1#d05
95-04-27 19:09:33 EDT => 95-04-27 19:45:32 EDT
> V2 >
+ save.95-04-27

%s1#tape.1.0

Restoring an Object Other Than the Top Directory of a Disk


This section describes the steps to follow when you must restore a particular saved
object. If the object is the top directory of a disk, see Retrieving the Complete Contents
of a Disk later in this chapter.
Before you can restore the object, you must know the volume ID of the tape volume on
which the object is saved. The name is recorded in the backup log file created by the
save command.
Always arrange system backup so that backup logs and tape logs are created. Much
of this section describes how to use these logs to determine the location of an object.
4-10

VOS System Administration: Backing Up and Restoring Data (R285)

Restoring an Object Other Than the Top Directory of a Disk

However, there is information later in the chapter about creating logs using the
restore command.

Locating the Object Using Backup Logs and Tape Logs


As mentioned in Chapter 2, save backup logs and tape logs online. This section
describes how to use the online logs. If you have only printouts of the logs to work with,
search the printouts manually for the information needed to restore an object. The
following steps describe the procedure for locating a saved object.
1. Ask users to estimate when the object was last modified and decide which backup
log is most likely to contain the latest entry for that object.
2. Search in the backup log for the path name of the object, using one of the two
methods given here.
If the log is a relatively small file, the fastest method is to use a text editor to search
directly in the file. Once you find the objects path name, scan backward or forward
in the file for the volume ID of the tape on which the object is saved. When you
know the volume ID, proceed with restoring the object.
If the log is a large file (for example, larger than 100 blocks), start a separate
process to perform the search for the path name. This frees your process to do
other work while the system is searching the file. Give the start_process
command, which is documented in VOS Commands Reference Manual (R098).
For the start_process command line, give the display command with the
following arguments:
file_name (the name of the log file)
-match (the path name of the object)
Issue the following command.
start_process display
object_path_name

backup_log

-match

This starts a process to search the backup log for the line in the file that contains
the path name of the object. When the line is displayed, note the time that the
object was saved.
3. Look in the tape log that was created with the backup log in which the object is
listed. Find the line that contains the time period during which the object was saved.
The volume ID that you need is on that line of the tape log. When you know the
volume ID, proceed with restoring the object.

Restoring Data from Logical Backups

4-11

Restoring an Object Other Than the Top Directory of a Disk

The file %s1#d01>Sales>Jones>customers was modified on February 1, 1995,


and inadvertently deleted on February 3. On February 2, a complete logical backup to
tape was performed for all the contents of %s1#d01. The following logs were created.
Backup log: complete_save.95_02_02
Length: 893 blocks
Tape log: tape_log.95_02_02
The system administrator performs the following steps to locate the file.
1. Asks users the date of the last modification to the deleted file.
2. Issues the following command.
start_process 'display complete_save.95_02_02
-match %s1#d01>Sales>Jones>customers'
The operating system searches the log and displays the following line.
95-02-02 12:32:57 EST
file
%s1#d01>Sales>Jones>customers
3. The administrator looks in the file tape_log.95_02_02 for a time period that
includes the time 12:32:57, and finds the following line:
95-02-02 12:03:50 EST => 95-02-02 12:42:58 EST
%s1#d01>tape.1.0>CS9>save.95_02_02
The system administrator notes the tape volume ID CS9 as the volume containing
the object to be restored.

Creating a Backup Log Using restore Arguments


If you do not have backup logs and tape logs to work with in searching for the location
of a saved object, you can obtain information about the objects on a particular save
tape by giving the following restore command.
restore %s1#tape.1.0 -volume_id V1 -no_restore -list
-same_place
This command displays the contents of the save tape on the screen. If you precede the
restore command with the command start_logging and follow the restore
command with stop_logging, the operating system writes the information about the
tape contents to a file, thus creating a backup log for one tape volume. You can then
use either of the methods described in the preceding section to search this log for the
4-12

VOS System Administration: Backing Up and Restoring Data (R285)

Restoring an Object Other Than the Top Directory of a Disk

object to be restored. See VOS Commands Reference Manual (R098) for descriptions
of the commands start_logging and stop_logging.
Follow these steps to create a file of information about the objects on a save tape.
1. Load the save tape onto a tape drive.
2. Give the start_logging command.
start_logging

log_path_name

The value of log_path_name is the name of the file you are creating.
3. Give the restore command.
restore %s1#tape.1.0 -volume_id V1 -no_restore -list
-same_place
4. When the output from this command is completed, give the following command.
stop_logging
The following example creates the file WS5_log. The file contains information about
the objects saved on the tape volume WS5.
start_logging WS5_log
restore %s1#tape.1.0 -volume_id WS5
-same_place
stop_logging

-no_restore

-list

Restoring the Object


After you locate the object you want to restore from a save tape, the restore operation
consists of loading the save tape and giving the restore command with the
appropriate arguments. Choose the correct objects argument and the most suitable
destination argument according to the information provided earlier in this chapter.
In most cases, give the -backup argument (if your process is privileged). However, if
the save tape contains more than one version of an object to be restored, and you want
to restore the earliest version, you must give the -first argument and not the
-backup argument. If you give -backup, you do not have to use -replace and
-restore_acls.

Multiple Restore Operations


If you are doing more than one restore operation to restore a directory that contains
many objects that were modified between saves, begin with the oldest save tape and
Restoring Data from Logical Backups

4-13

Retrieving the Complete Contents of a Disk

end with the newest, using the -trim argument each time you give the restore
command.
Your backup plan includes a monthly complete save, weekly consolidated saves, and
daily incremental saves. Some or all of the contents of the directory to be restored are
on all of the save tapes. In order to recover the complete directory as it currently exists,
perform the following steps.
1. Restore the directory contents from the last complete backup.
2. Do restore operations with each of the weekly consolidated save tapes, from the
oldest to the newest.
3. Do restore operations using the daily save tapes made within the last week, from
the oldest to the newest.
Use the -trim argument in all of the restores of weekly and daily save tapes. Use the
same destination directory for all of the restores.

Retrieving the Complete Contents of a Disk


This section outlines the steps to follow to restore the complete contents of a disk. You
probably need the steps outlined here only if a nonduplex disk in your system fails. See
VOS System Administration: Disk and Tape Administration (R284) for the steps
involved in recovering from the failure of one partner of a duplex disk. Although a
master disk should always be a duplex disk, this section provides information about
restoring the contents of a nonduplex master disk.

Retrieving the Contents of a Nonboot Disk


Follow these steps to restore the contents of a disk other than a master disk.
1. Determine when the most recent backup of the disk contents occurred, and gather
all of the tapes that contain copies of the disk contents that you will reload and/or
restore. If a physical dump was performed more recently than a logical complete
save, get the dump tape. If a complete save was more recent, get the tape with the
saved contents. If any partial saves were performed on the disk since the most
recent dump or complete save, use the steps outlined in the section Locating the
Object Using Backup Logs and Tape Logs earlier in this chapter. This procedure
helps you to locate saved objects from the disk which you are restoring, and get
the tapes that contain these saved objects.
2. Give the initialize_disk command if the disk is new. The disk_name
argument in this command is an uninitialized disk name which describes the disks
physical location within the module. For more information about uninitialized disk
names, see VOS System Administration: Disk and Tape Administration (R284).
4-14

VOS System Administration: Backing Up and Restoring Data (R285)

Retrieving the Complete Contents of a Disk

3. If you are reloading from a backup tape, give the reload_disk command with the
appropriate arguments. The -unattended argument can now be used with the
reload_disk command. See the VOS Commands Reference Manual (R098).
The disk being reloaded must be located on your current module, but the tape drive
can be located on any module within the local or wide area network.
Be sure the master disk that you are reloading is the same
size or larger than the corresponding master disk from
which the dump image came. If you use a different or
larger disk than the original, be sure the dump partition is
the same size as the original.
If you are restoring from a logical complete save tape, give the restore command
with the -backup argument and whatever arguments are appropriate. The
-unattended argument can now be used with the restore command. See the
VOS Commands Reference Manual (R098).
4. If you have partial saves on tapes, load the oldest tape into an available tape drive.
Give the restore command using -backup, -trim, and whatever other
arguments are appropriate for the tape. Then, unload the oldest tape and repeat
this process for all the tapes with partial saves, working from the oldest tape to the
most recent. See Multiple Restore Operations earlier in this chapter for more
information.
5. Give the salvage_disk command.
6. Give the mount_disk command.
This is an example of how to restore the nonboot, nonduplex member disk
#d02.0.pri, which is attached to the disk controller in main chassis slot 1 and is
device 2. To restore the nonboot, nonduplex disk, perform the following steps.
1. Determine from hard copy logs the dates and types of the most recent backups,
and gather the tapes from these backups. The backups and their tape volume
numbers are:
a complete logical save performed on January 15 volume CS7.
incremental saves performed on January 23 and 27 volumes WS2 and WS3.

When performing a multitape restore, you must always


explicitly attach the port and mount the tapes. See
Performing a Complete Save of an Entire Disk in
Chapter 2 for information about attaching the port and
mounting the tapes for multivolume operations.
2. Issue the following command: initialize_disk disk_01_02

d02

3. Load tape volume CS7 onto tape drive #t_12 and issue the following command.

Restoring Data from Logical Backups

4-15

Retrieving the Complete Contents of a Disk

restore port1
-volume_id CS7

-source d02

-same_place

-backup

4. Unload tape volume CS7; load tape volume WS2 and issue the following command.
restore port1 -source d02 -same_place -backup -volume_id
WS2 -trim
5. Unload tape volume WS2; load tape volume WS3 and issue the following command.
restore port1 -source d02 -same_place -backup -volume_id
WS3 -trim
6. Unload tape volume WS3 and issue the following commands.
salvage_disk
mount_disk

4-16

d02

VOS System Administration: Backing Up and Restoring Data (R285)

Retrieving the Complete Contents of a Disk

The following example shows how to restore the nonboot, nonduplex member disk
d02.0.pri. It is attached to the IOP in main chassis slot 2 via the IOA in IOA chassis
slot 3 and is device 0. To restore the nonboot, nonduplex disk that is controlled by an
IOP rather than a disk controller board, perform the following steps.
1. Determine from hard copy logs the dates and types of the most recent backups,
and gather the tapes from these backups. The backups and their tape volume
numbers are:
a complete logical save performed on January 15 volume CS7.
incremental saves performed on January 23 and 27 volumes WS2 and WS3.

When performing a multitape restore, you must always


explicitly attach the port and mount the tapes. See
Performing a Complete Save of an Entire Disk in
Chapter 2 for information about attaching the port and
mounting the tapes for multivolume operations.
2. Issue the following command:
initialize_disk

disk_02_03_00

d02

3. Load tape volume CS7 onto tape drive #t_12 and issue the following command.
restore port1
-volume_id CS7

-source d02

-same_place

-backup

4. Unload tape volume CS7; load tape volume WS2 and issue the following command.
restore port1 -source d02 -same_place -backup -volume_id
WS2 -trim
5. Unload tape volume WS2; load tape volume WS3 and issue the following command.
restore port1 -source d02 -same_place -backup -volume_id
WS3 -trim
6. Unload tape volume WS3 and issue the following commands.
salvage_disk
mount_disk

d02

Restoring Data from Logical Backups

4-17

Retrieving the Complete Contents of a Disk

Retrieving the Contents of a Master Disk


Follow these steps to restore the contents of a master disk.
1. Determine when the most recent backup of the disk contents occurred, and gather
all the tapes that contain copies of the disk contents that you will reload and/or
restore. If a physical dump was performed more recently than a complete save, use
the dump tape to reload the boot disk. If a complete logical save was more recent,
use the boot tape to reload the contents of the master disk. If any partial saves were
performed on the disk since the most recent dump or complete save, use the steps
outlined earlier in this chapter to locate saved objects from the disk that you are
restoring, and get the tapes that contain these objects.
A boot tape should be available as a result of the most
recent dump_disk command executed on the master
disk. This command always puts a copy of the operating
system on the tape before copying the rest of the contents
of the disk. Both the tape drive and the disk to be reloaded
must be located on the current module.
2. Perform a manual boot from tape as outlined in VOS System Administration:
Starting Up and Shutting Down a Module or System (R282) until the operating
system asks the following question:
Reload master disk disk_name?
Answer yes. Once the contents of the master disk are reloaded from the boot tape,
you are prompted to mount any tapes with partial saves of the master disk. Use the
restore command with the -backup and -trim arguments to load the
information from each tape. See Multiple Restore Operations earlier in this
chapter for more information.
Make sure the master disk that you are reloading is the same size as the master
disk from which the dump image was made. If the new master disk is a different
size, the reload will not be performed correctly.
Also, make sure that the disk you are reloading uses the same type of bad block
remapping as the disk from which the dump image was made. For example, you
cannot reload a disk which uses dynamic bad block remapping with a dump image
from a disk which did not use dynamic bad block remapping.
If you do not have a boot tape to work with, the operating system mounts an empty
disk and brings you to command level. There are two points to note in this situation:
The operating system does not have the file it needs to interpret abbreviated

answers to the questions it asks. Therefore, you must spell out all answers. For
example, if you give the abbreviation y for yes, the operating system will
interpret this as no.

4-18

VOS System Administration: Backing Up and Restoring Data (R285)

Retrieving the Complete Contents of a Disk


Since the operating system has no error codes table, it will display codes,

which you will have to interpret, rather than error messages. Therefore, it is a
good idea to have a printed copy of the error_codes.tin file available.
This example describes how to restore the boot, nonduplex member disk
#d02.0.pri, which is connected to the disk controller in slot 12 and is device 1. The
dialogue in this example takes place at the terminal connected to channel 0 of the first
communications controller. The boot tape is loaded in the tape drive which is
connected to the tape controller in slot 7. To restore a boot, nonduplex member disk,
perform the following steps.
1. Determine from hard copy logs the dates and types of the most recent backups,
and gather the tapes from these backups. The backups and their tape volume
numbers are:
A physical dump performed on January 3 volume D21. (This is the boot

tape.)
A complete logical save performed on January 20 volume CS4.
A consolidated save performed on January 27 volume WS6.
An incremental save performed on January 28 volume V1.

2. On a 6-slot module, press the POWER ON button at the top of the control panel.
The green OPERATING lights alternate with the amber TEST/PROBLEM lights
every four seconds while the computer is starting up. The green OPERATING
lights become steady when the computer is running.
For a 10- or 40-slot module, refer to VOS System
Administration: Starting Up and Shutting Down a Module
or System (R282).
3. The operating system asks the following question.
Boot from slot?
Type the slot number in response to the prompt: 7.
4. The operating system asks the following question.
Do you want to format disk_12_01 (#d01.0.pri)?
Type your response to the question: no.
5. The operating system asks the following question.
Do you want to initialize disk_12_01 (#d01.0.pri)?
Type your response to the question: no.

6. The operating system asks the following question.


Reload master disk (#d01.0.pri)?
Restoring Data from Logical Backups

4-19

Retrieving the Complete Contents of a Disk

Type your response to the question: no.


When performing a multitape restore, you must always
explicitly attach the port and mount the tapes. See
Performing a Complete Save of an Entire Disk in
Chapter 2 for information about attaching the port and
mounting the tapes for multivolume operations.
7. Load tape volume CS2 onto tape drive #t3.
restore port1
-volume_id CS2

-source #d01

-same_place

-backup

8. Unload tape volume CS2; load tape volume WS6.


restore port1 -source #d01 -same_place -backup -volume_id
WS6 -trim
9. Unload tape volume WS6; load tape volume V1.
restore port1 -source #d01 -same_place -backup -volume_id
V1 -trim

10. Unload tape volume V1. The operating system asks the following question.
Enter PCP for manual damage repair (%s1#d01)?
Type your response to the question: no. Wait for the display of the ready message
and the periodic test results.
11. Issue the following commands:
start_logging module_start_up.out >system>module_start_up
(Press <RETURN> and <NO_PAUSE>.)
Type logout.
The next example describes how to restore the boot, nonduplex member disk
d02.0.pri, which is connected to the IOP in main chassis slot 1 via the IOA in IOA
chassis slot 3 and is device 0. The dialogue in the example takes place at the terminal
connected to channel 0 of the first communications IOA. The tape drive is connected
to the IOP in main chassis slot 7 via the tape IOA in IOA chassis slot 4.
Refer to the steps given in the section Retrieving the Contents of a Master Disk,
earlier in this chapter. The commands and operations are:
1. Determine from hard copy logs the dates and types of the most recent backups,
and gather the tapes from these backups. The backups and their tape volume
numbers are:

4-20

VOS System Administration: Backing Up and Restoring Data (R285)

Retrieving the Complete Contents of a Disk


A physical dump performed on January 3 volume D21. (This is the boot

tape.)
A complete logical save performed on January 20 volume CS4.
A consolidated save performed on January 27 volume WS6.
An incremental save performed on January 28 volume V1.

2. On a 6-slot module, press the POWER ON button at the top of the control panel.
The green OPERATING lights alternate with the amber TEST/PROBLEM lights
every four seconds while the computer is starting up. The green OPERATING
lights become steady when the computer is running.
For a 10- or 40-slot module, refer to VOS System
Administration: Starting Up and Shutting Down a Module
or System (R282).
3. The operating system asks the following question.
Boot from slot?
Type the slot number in response to the prompt: 1.
4. The operating system asks the following question.
Enter IOA slot/device in the form ss/cc
Type the IOA slot number in response: 02/03.
5. The operating system asks the following question.
Do you want to format disk_01_03_00 (#d01.0.pri)?
Type your answer in response: no.
6. The operating system asks the following question.
Do you want to initialize disk_01_03_00 (#d01.0.pri)?
Type your answer in response: no.
7. The operating system asks the following question.
Reload master disk (#d01.0.pri)?
Type your answer in response: yes.
When performing a multivolume restore, you must always
explicitly attach the port and mount the volumes. See
Performing a Complete Save of an Entire Disk in
Chapter 2 for information about attaching the port and
mounting the volumes for multivolume operations.
Load volume CS2 onto drive #t3 and issue the following command.
restore port1
-volume_id CS2

-source #d01

-same_place

-backup

Restoring Data from Logical Backups

4-21

Retrieving the Complete Contents of a Disk

8. Unload volume CS2; load volume WS6 and issue the following command.
restore port1 -source #d01 -same_place -backup -volume_id
WS6 -trim
9. Unload volume WS6; load volume V1 and issue the following command.
restore port1 -source d01 -same_place -backup -volume_id
V1 -trim
10. Unload volume V1. The operating system asks the following question.
Enter PCP for manual damage repair (%s1#d01)?
Type your answer in response: no.
Wait for the display of the ready message and the periodic test results.
11. Issue the following commands:
start_logging module_start_up.out >system>module_start_up
(Press <RETURN> and <NO_PAUSE>.)
Type logout.

4-22

VOS System Administration: Backing Up and Restoring Data (R285)

Using Pipe Files to Copy or Move Directories

Using Pipe Files to Copy or Move Directories


This section describes a way to copy or move a directory from one disk to another using
the save and restore commands with a pipe file. You can use this procedure for any
directory, including the top directory of a disk.
A pipe file is a file used to connect processes, so that one process produces data for
another process. To designate a file as a pipe file, use the command set_pipe_file,
which is documented in VOS Commands Reference Manual (R098).
This procedure involves two independent, privileged
processes. So, you must have two terminals to perform
this procedure. On the first terminal, you run the save
process to write data to the file. On the second terminal,
you run the restore process to read data from the file.
The data in a pipe file is transitory: it exists only while the pipe is open. To prevent the
data loss that will occur if the pipe closes prematurely, follow the steps outlined below.
1. Create a file, using the create_file command.
2. Make the new file a pipe file, using the set_pipe_file command.
3. Attach a port to the pipe file for the restore process.
4. Attach a port to the pipe file for the save process.
5. Perform one of the following:
Give the command restore port_name -source string -destination

path_name -restore_acls if you want to restore ACLs, and you want to


restore the objects with the attributes of newly created objects.
Give the command restore port_name -source string -destination

path_name -backup if you want to restore ACLs, and you want to restore the
objects with the attributes they had.
In either restore operation, for the -source argument, give the path name of the
directory to be copied. For the -destination argument, give the path name of
the directory on the second disk. The path names for the -source and
-destination values must include the top disk directory name.
6. Give the command save port_name path_names -backup. For port_name,
use the name you supplied in Step 4. For the path_names argument, supply the
name of the directory to be copied. Answer yes to the question Overwrite
existing file?
7. When the save is complete, detach the port name specified in Step 4.
8. When the restore is complete, detach the port name specified in Step 3.
9. If you want to delete the original directory, use the delete_dir command on the
directory specified in the -source argument of the restore command in Step 5.
Restoring Data from Logical Backups

4-23

Copying Tapes

There are several advantages to using this procedure rather than the move_dir or
copy_dir command. This procedure does the following:
retains the attributes that each object in the directory had and/or retains the ACLs

and DACLs associated with each object in the directory.


automatically translates the links that refer to the directory and to objects in the

directory.
is generally faster than the move_dir or copy_dir command.

The following example shows the steps in the procedure for copying the directory
#d01>system from disk d01 to disk d02.
This procedure involves two independent, privileged
processes. So, you must have two terminals to perform
this procedure. On the first terminal, you run the save
process to write data to the file. On the second terminal,
you run the restore process to read data from the file.

The Save Process


(First Terminal)

The Restore Process


(Second Terminal)

Step 1. create_file file_name


Step 2. set_pipe_file file_name
Step 3. attach_port port_name2

file_name
Step 4. attach_port port_name2

file_name
Step 5. restore port_name2 -source

#d01>system
-destination #d02>system_copy
-restore_acls -backup
Step 6. save port_name2 #d01>system

-backup
Step 7. detach_port port_name2
Step 8. detach_port port_name2

Copying Tapes
The copy_tape command creates duplicates of a tape. The copy_tape command is
documented in Chapter 5 of this manual.
4-24

VOS System Administration: Backing Up and Restoring Data (R285)

Copying Tapes

To copy tapes, perform the following steps.


1. Log into a module, and load the source tape in a tape drive.
2. Load the copy tapes to destination drives.
3. Issue the copy_tape command, giving the source tape device and the destination
tape devices as the arguments.

Restoring Data from Logical Backups

4-25

Copying Tapes

4-26

VOS System Administration: Backing Up and Restoring Data (R285)

Chapter 5
Commands

5-

This chapter documents the following administrative commands.


copy_tape
dump_disk
restore
save

Commands

5-1

copy_tape

copy_tape

5-

Purpose
The copy_tape command makes logical copies of all tape formats.

Display Form
--------------------------------- copy_tape ----------------------------------source_tape_device_or_port:
destination_tape_devices_or_port:
-destination_density:
-create_destination_volume:
no
-simultaneous_rewind:
no

Command-Line Form
copy_tape source_tape_device_or_port
destination_tape_devices_or_port
[-destination_density density]

[-create_destination_volume]

[-simultaneous_rewind]

Arguments

* source_tape_device_or_port
Required
The name of a tape device or port that is to hold the data to be copied.

* destination_tape_devices_or_port
Required
The names of the tape devices or ports to be written to. If a tape is already mounted
as a destination tape, its volume label will be used but the tape will be overwritten.
* -destination_density density
<CYCLE>
Copies the new tape a different density than the original. Allowed values are 1600,
3200, and 6250. If you specify a density that the drive does not support,
copy_tape will abort.

5-2

VOS System Administration: Backing Up and Restoring Data (R285)

copy_tape

* -create_destination_volume
<CYCLE>
Creates volumes without using the mount_tape command to create the
destination tape volumes. This argument is ignored if the destination tapes were
mounted before issuing the copy_tape command. The default value is no.
If the destination tapes are not yet mounted, and
-create_destination_volume is set to no, the copy_tape command tries to
implicitly mount the destination tape using the volume labels that are on the tapes.
If a volume label is not on a tape, or if an error occurs while doing the implicit mount,
the copy_tape command aborts. If the implicit mount is successful, any data
currently contained on the tapes is overwritten by copy_tape.
If the destination tapes are not yet mounted, and
-create_destination_volume is set to yes, the copy_tape command
issues the TAPE_CREATE_VOLUME_OPCODE to mount the tapes. Any labels or
data contained on the destination tapes are overwritten by copy_tape.

* -simultaneous_rewind
<CYCLE>
Rewinds all tapes when one reaches the end of the tape. This argument improves
performance when making many copies simultaneously. The default value is no.
While this argument may be used with different types of
destination tapes, Stratus recommends that tapes always
be of the same type to avoid wasting tape.

Explanation
The copy_tape command is used to create logical duplicates of a tape volume or
multivolume set. While logical volumes may have different volume IDs, the file IDs and
data contained in those files must be identical.
Copying multivolume sets may change the actual tape a
given file or block of data is on. When using copied tapes
to restore, invoke the list_save_tape command to
determine which tape a desired file is on.
The copy_tape command can attach a port and mount a tape. When copy_tape
performs these actions, it also dismounts the tape and detaches the port on completion
of the process.

Examples
To copy a tape from a port named port1 to a port named port2, issue the following
command.
copy_tape port1

port2

Commands

5-3

copy_tape

To copy a tape from a port named port1 to four ports named port2, port3, port4,
and port5, and to force simultaneous rewinds of the tapes, issue the following
command.
copy_tape port1 port2 port3 port4 port5 -simultaneous_rewind

5-4

VOS System Administration: Backing Up and Restoring Data (R285)

dump_disk

Privileged

dump_disk

Purpose
The dump_disk command copies all of the allocated blocks on a specified logical
volume to tape.

Display Form
----------------------------------- dump_disk ---------------------------------tape_device_or_port_name:
disk_name:
-pause:
no
-compression:
if_available
-unattended:
no

Command-Line Form
dump_disk tape_device_or_port_name disk_name
[-pause]
[-compression]
[-unattended]

Arguments

* tape_device_or_port_name
Required
The name of a tape device or port that has been attached to a tape drive.

* disk_name
Required
The name of the logical volume to be dumped. The logical volume must be located
on the current module.
* -pause
<CYCLE>
If you call this argument, the operating system pauses after the first pass over a
disk and displays the following message:
Suspend disk activity now. Ready?

Commands

5-5

dump_disk

You can then send a message to users requesting that they write out all files. When
you are satisfied that the dump should proceed, you respond yes to the -pause
message and the operating system makes a second pass over the logical volume.
If, instead, you want to terminate the dump, you can type abort in response to the
message.
The default value for this argument is no. See the Explanation for further
information about this argument.

* -compression
<CYCLE>
Enables you to select data compression if you have a tape drive that supports data
compression. Note, however, that the compressibility of data may vary widely. If
you are using either the T402-001 or T402-002 tape drive, each cartridge will
typically contain two to three times the equivalent of uncompressed data.
However, some data patterns may compress slightly or not at all. The default is
if_available.
* -unattended
<CYCLE>
Suppresses dump_disk prompts so that more than one tape can be saved to,
without user intervention. The default value is no.
This argument can only be used if the save is being
performed on a T401/T402 tape drive. The dump_disk
command will not function properly if this argument is
invoked and a T401/T402 tape drive is not available. For
more information on the T401/T402 tape drive, see the
T401/T402 Tape Drive Users Guide (R315).

Explanation
Data written to tape by the dump_disk command can be processed only by the
reload_disk command. You cannot reload individual files or directories written by
dump_disk. The density of the tape must be 1600 bpi or 6250 bpi. The default
is 1600 bpi, so if you chose to use 6250 bpi, you must use the
set_tape_mount_params command to change the tape density before using the
dump_disk command. Do not use any other tape density. See the reload_disk
command description in VOS System Administration: Disk and Tape
Administration (R284) for more information.
If you write a command macro file, start a (non-interactive) process, use the
mount_tape or set_mount_tape_params command to select a tape density other
than 1600 or 6250 bpi, or select a tape device that supports a density of other than
1600 or 6250 bpi. Execute the dump_disk command. The dump_disk command
aborts with the following error message:
dump_disk:

5-6

tape would not have been bootable at density N

VOS System Administration: Backing Up and Restoring Data (R285)

dump_disk

command aborted
All Stratus tape drives support densities of either 1600 or 6250 bpi. Tapes created at
one of these densities can be used as boot tapes on any system. Tapes created at
other densities may not necessarily be used as boot tapes.
To ensure a consistent copy of the contents of the logical volume, the operating system
makes multiple passes over the data. The first pass dumps all allocated disk blocks.
The second and subsequent passes dump all disk blocks modified since the beginning
of the previous pass. The dump terminates when the operating system makes a pass
that finds no modified blocks. Generally, a logical volume that is being modified can be
dumped in only a few passes, since the logical volume can be dumped faster than it
can be modified.
If the logical volume is in use while it is being dumped, you want to be sure that the
operating system will dump consistent copies of the contents of the logical volume. This
requires that every file open for modification be closed before dump_disk finishes.
The -pause argument allows you to inform other users that disk activity will be
suspended during the second pass of dump_disk, so that the operating system can
get a consistent copy of every disk block.
If you write a command macro file, include the dump_disk -pause command, and
then issue the command macro from the batch command. The following message is
written to the .out file:
Dump_disk: -pause is not supported in a non-interactive
environment.
The dump_disk command stops. Since the -pause argument requires user input to
resume the dump_disk command, the command cannot be issued from a
non-interactive process.
To send a message to users when the operating system displays the -pause
message, give the broadcast command, using a different terminal from the one on
which you gave the dump_disk command. When the dump is completed, you should
broadcast a message to inform users that they can begin disk activity again.
When the operating system executes dump_disk on a master disk, it puts a copy of
the operating system on the tape before copying the rest of the contents of the logical
volume. The result is a tape that can be used for a manual tape boot of the system.

If you are manually booting your system from tape, and then wish to use the
dump_disk command to create another boot tape, perform the following procedure:

Commands

5-7

dump_disk

1. When you are prompted, Reload master disk (#disk_name)?, while you
are manually booting your system from tape, answer yes. When you perform this
step, you move that part of the operating system needed to boot the system from
memory to the dump partition of the master disk.
2. Shut down the system and manually reboot your system from disk. This step tells
the dump_disk command that the current version of the operating system was
booted from the boot partition of the master disk.
3. Create a boot tape by using the dump_disk command to back up the master disk.
If you boot the system from tape and do not follow this procedure, when you try to
create a boot tape with the dump_disk command you will receive the message:
dump_disk:
boot tape

Object not found.

reading operating system for

For more information on manual boot procedures, see Starting up a Module or


System in VOS System Administration: Starting Up and Shutting Down a Module or
System (R282).
Stratus no longer supports multi-member boot disks.
The dump_disk command can operate across a wide area network. The logical
volume to be dumped must be on the current module, but the tape drive can be
anywhere within the network.
The dump_disk command does not update the date-time-saved value of objects on
the logical volume.
If recover_disk is running on a member disk, you cannot run dump_disk on the
logical volume containing that member disk.
Normally you cannot run dump_disk at the same time that a reload_disk command
or another dump_disk command is being executed on the same module. If you
attempt to do so, the operating system displays the error message
e$no_dump_reload_buffer_available (3428). However, you can use the
edit_vm_sizes request of the analyze_system command to allow simultaneous
dumps and/or reloads. Refer to the VOS System Analysis Manual (R073) for more
information.
The command set_second_tape cannot be used with dump_disk since a single
tape drive is required.

Examples
The following command copies all the allocated blocks of the logical volume d04 to the
tape drive attached to the port tape1, with the operating system causing a pause and
issuing a prompt after each pass over the data.
5-8

VOS System Administration: Backing Up and Restoring Data (R285)

dump_disk

dump_disk

tape1

d04

-pause

For information on calculating the number of reels or cartridges of tape you need, see
Appendix H, Estimating the Number of Blocks on a Tape, in VOS Tape Processing
Users Guide and Programmers Reference (R052).

Related Information
See Chapter 3, Backup Operations, in this manual and the VOS System
Administration: Disk and Tape Administration (R284) manual.

Commands

5-9

restore

restore

5-

Purpose
The restore command restores directories, files, or links saved with the save or the
save_object command.

Display Form
------------------------------------ restore ---------------------------------tape_device_or_port_name:
object_names:
-source:
-destination:
-volume_id:
-restore:
yes
-list:
no
-replace:
no
-same_place:
no
-first:
no
-pack:
no
-trim:
no
-restore_acls:
no
-backup:
no
-extent_new_size:
-extent_num_records:
-unattended:
no

5-10

VOS System Administration: Backing Up and Restoring Data (R285)

restore

Command-Line Form
restore tape_device_or_port_name
[object_names ...]
[-source string]

-destination path_name
-same_place

[-volume_id volume_id]
[-no_restore]
[-list]

[-replace]
[-first]

[-pack]

[-trim]

[-restore_acls]

[-backup]

-extent_new_size new_size
-extent_num_records num_records
[-unattended]

Arguments

* tape_device_or_port_name
Required
The name of a tape device or port containing the objects to be restored.

* object_names
One or more path names or star names of objects to restore. The names must be
separated by spaces. See the tables in the Arguments Tables section of this
command description for an outline of how this argument interacts with the
-source argument and how it can be modified by the modifying arguments.
If the common path name is the null string and you do not give a full path name for
the -source argument, the restore command asks you to supply a full path
name that is common to all the object_names values.

* -source string
Causes the restore command to look for a directory with a save path name that
is a combination of the string value and the common path name. This is the
directory that will be restored. See the tables in the Arguments Tables section of

Commands

5-11

restore

this command description for an outline of how this argument interacts with the
object_names argument and how it can be modified by the modifying arguments.
If the common path name is the null string and you do not give a full path name for
the string value, the restore command asks you for a common path name.

* -destination path_name
Specifies the path name of the directory to which the restore command will
restore the saved objects. You cannot give both this argument and the
-same_place argument. If you omit both, restore makes the current directory
the destination directory. See Table 5-3 later in this command description.

* -volume_id volume_id
Specifies the volume ID of the first volume of save tapes to be used for the restore
operation. When tape_device_or_port_name represents the tape drive or port
attached to a tape drive, you must supply a volume ID either with this argument or
when the restore command asks you for it. When
tape_device_or_port_name represents a port attached to a disk file,
restore disregards this argument.
It is unnecessary to give more than one volume ID, since the save command
stores the volume ID of any additional save tape on the preceding save tape.
If the volume_id value does not name the first volume used for the save,
restore notifies you that you are beginning the restore with a subsequent
volume.

* -no_restore
<CYCLE>
Saved files, links or directories not to be restored. This argument is designed to be
used with the -list and -same_place arguments, to display a list of save path
names without restoring any objects. You can also use these arguments to create
a backup log for a tape volume, as described in Chapter 2, Backing Up Data. The
default value is yes, which allows the restore to proceed normally.
If you give -no_restore but omit -list, the command restores nothing. If you
are acting on a save tape, however, the tape will be positioned to the end of the
save file on the tape. You cannot give both this argument and the -backup
argument.

* -list
<CYCLE>
Lists the save path name of each object as it is restored. The default value is no,
which means the list is not displayed.

If the -no_restore argument is also given, the command displays the save path
names of all objects that satisfy the conditions of the objects arguments (described
in Table 5-1), but no objects are restored.

5-12

VOS System Administration: Backing Up and Restoring Data (R285)

restore

* -replace
<CYCLE>
Replaces the file or link in the destination directory with the file or link from the save
tape. If necessary, restore overrides the safety switch and/or expiration date on
any file or link to be replaced.
The default value for this argument is no, meaning that restore will not overwrite
an existing file or link. Instead restore issues a warning message that the saved
file or link is not being restored.
The -backup argument performs the function of the -replace argument, and
overrides the default no value for -replace. See Table 5-2.

* -same_place
<CYCLE>
Restores saved objects to the locations in the hierarchy where they had been
saved, as defined by the objects save path names.

The default value is no. You cannot give both this argument and the
-destination argument. See Table 5-2 and Table 5-3. If you give this argument
with the -no_restore and -list arguments, -same_place assures that the
objects are listed with their save path names.

* -first
<CYCLE>
Restores the earliest version of each object that is restored. When the save
command makes a save tape or file with the -after argument, it periodically
saves all objects that were modified since they were last saved. Thus several
versions of an object can be in a save tape or file.

The default value is no, meaning the restore command restores the latest
version of any object it restores. Since the -backup argument restores the latest
version of each object, the -backup and -first cannot be used at the same
time. Since the -trim argument is used for multiple backups and restores a
directory to its state at the time of the last backup, the -trim and -first
arguments cannot be used at the same time. See Table 5-2.

* -pack
<CYCLE>
Packs the files being restored. If you choose this argument, the restore
command discards deleted records. Do not choose this argument if any of the files
to be copied have separate-key or item indexes, or are server queue files,
message queue files, or fixed files.
The default value is no, meaning restore does not pack the files.

* -trim
<CYCLE>
Deletes from the destination directory all objects deleted by users between the time
of the first restored backup and the time of the the last restored backup. restore
overrides the safety switch and/or expiration date on any object to be deleted. It
thus restores a directory to its state at the time of the last backup. Use this
Commands

5-13

restore

argument when you restore data from multiple backups to the same destination
directory.
For example, suppose you lose all of the contents of a disk, but you have save
tapes for a monthly complete backup, weekly consolidated backups, and daily
incremental backups on that disk. To restore the disk contents, you first restore the
data from the last complete backup. Then you use -trim in the commands to
restore the weekly backup data and finally the daily backup data. After the final
restore command, the contents of the disk match exactly the contents at the time
of the last daily backup. Without -trim, the disk would include objects deleted by
users between the time of the complete backup and the final daily backup.
In most cases, -trim is used when restoring an entire directory hierarchy, such as
the top directory on a disk or a group directory, but not a smaller directory structure
or a file.
The default value is no. If you use the -trim argument, you cannot use the
-first argument. See Table 5-2.

* -restore_acls
<CYCLE>
Restores an objects saved ACL when the object is restored.

The default value is no, meaning no saved ACLs are restored. The -backup
argument performs the function of the -restore_acls argument, and overrides
the default no value for -restore_acls. If you use the -restore_acls
argument, you cannot use the -no_restore argument.

* -backup
If you use this argument, the restore command:

<CYCLE> (Privileged)

gives you temporary access to any object you need to overwrite.


retains the date-time-saved and date-time-modified attributes of the objects in

the save file. (Without -backup, the restore command updates these values
when it restores an object.)
restores the saved ACL of each object. This implies the -restore_acls

argument and overrides a no value for -restore_acls.


performs the function of the -replace argument, and overrides a no value for

-replace.
restores the latest version of each object if the object has not been altered

since the last save. If it was altered, it is replaced with the version that was
saved on the tape. You cannot give both -backup and -first.
The -backup argument restores the objects with the attributes they have on the
save tape or disk file. The default value is no, meaning each object is restored with

5-14

VOS System Administration: Backing Up and Restoring Data (R285)

restore

the attributes of a newly created object. If you use the -backup argument, you
cannot use the -no_restore argument. See Table 5-2.

* -extent_new_size new_size
Changes the size of an extent-based file to be restored (refer to the
-extent_num_records argument description). Whenever restore finds an
extent-based file, it recalculates the number of extents and the initial allocated size
for the new file. It then creates a new extent-based file with these attributes and
restores the saved extent-based file to it. new_size is the number of blocks that
will be assigned to each extent. This argument requires you to specify the
-extent_num_records argument.
* -extent_num_records num_records
Specifies the number of records to be pre-allocated as extents in the restored
extent-based file. You must make this number large enough to allocate sufficient
extents because, when the number of extents allocated is exceeded, succeeding
blocks will not be extent-based. This argument requires you to specify the
-extent_new_size argument.
* -unattended
<CYCLE>
Suppresses dump_disk prompts so that more than one tape can be saved to,
without user intervention. The default value is no.
This argument can only be used if the save is being
performed on a T401/T402 tape drive. The dump_disk
command will not function properly if this argument is
invoked and a T401/T402 tape drive is not available. For
more information on the T401/T402 tape drive, see the
T401/T402 Tape Drive Users Guide (R315).

Explanation
A restore command restores objects saved with a save or save_object
command. The restore command determines which objects to restore based on the
objects arguments and the modifying arguments. These are outlined in the Arguments
Tables section of this command description.
You must be privileged to restore transaction files.
Before issuing the restore or restore_object command, give the verify_save
command to verify that the save file, save tape or object saved earlier with a save or
save_object command can be read and restored with the restore command. The
verify_save command is described in VOS Commands Reference Manual (R098).
If a device access list has been created for the tape drive, you need read or write
access to the tape drive. You need modify access to the directories in which objects
will be restored.
Commands

5-15

restore

The restore command can attach a port and mount a tape. When restore performs
these actions, it also automatically dismounts the tape and detaches the port on
completion of the process. If you need to hold the port open after a restore, you must
attach the port and mount the tape explicitly.
The display_file_status command shows index
names in order of the index address inside the file. This
order may change if the file is specified as the subject of
the copy_file, move_file, restore_object, or
save_object command.
Before working with the restore command, you must have a thorough understanding
of path names, save path names, and common path names. If you have any questions
about path names, see the section Objects in Chapter 1 of this manual. If you still
have questions, see the VOS Reference Manual (R002) for more information on
objects and path names.

Examples
Figure 1-1 showed a sample directory hierarchy. The figure depicted the directory
structure used in the following examples.
To restore all of the directory Clark, do one of the following:
Specify the path name >Accounting>Clark in the -source argument as shown

in the following example.


restore %s1#tape.1.0 -source >Accounting>Clark
Specify the star name * as the object_names argument and specify the path

name >Accounting>Clark in the -source argument.


restore %s1#tape.1.0 * -source >Accounting>Clark

5-16

VOS System Administration: Backing Up and Restoring Data (R285)

restore

To restore the Clark and Carlson directories, but not the file ledger, do one of the
following:
Specify the path name >Accounting>C* as the object_names argument. (This

will also restore any objects in Accounting starting with the letter C.)
restore %s1#tape.1.0 >Accounting>C*
Specify the star name C* as the object_names argument and specify the path

name >Accounting in the -source argument. (This will also restore any objects
in Accounting starting with the letter C.)
restore %s1#tape.1.0 C* -source >Accounting
Specify the path names >Accounting>Clark and >Accounting>Carlson as

the object_names argument.


restore %s1#tape.1.0 >Accounting>Clark
>Accounting>Carlson
To restore the two files named finance, you must specify the full path name of each
in either the object_names or -source argument.
If you use the object_names argument, you specify both in a single restore

command:
restore %s1#tape.1.0 %s1#d01>Accounting>Clark>finance
%s1#d01>Accounting>Carlson>finance
If you use the -source argument, you must use two restore commands. (If you

are restoring from tape, rewinding is necessary between commands.)


restore %s1#tape.1.0 -source
%s1#d01>Accounting>Clark>finance
restore %s1#tape.1.0 -source
%s1#d01>Accounting>Carlson>finance

Commands

5-17

restore

Arguments Tables
These tables show three groups into which some of the arguments to the restore
command can be separated. The tables are:
Table 5-1, The Objects Arguments to the restore Command
Table 5-2, The Modifying Arguments to the restore Command
Table 5-3, The Destination Arguments to the restore Command.

See the section Finding a Common Path Name in Chapter 1 for more information
about how the operating system determines which objects to restore.
Table 5-1 lists the arguments used to specify objects for the restore command.
Table 5-1. The Objects Arguments to the restore Command
Argument

Objects Restored

object_names

Objects with save path names that match the given star names.

-source string

The directory with a save path name that is a combination of


string and the common path name.

Both objects arguments

Objects with save path names that:


1. combine string and the common
path name
2. match the given object_names.

Neither objects arguments

5-18

All objects on the save tapes or in the save disk file.

VOS System Administration: Backing Up and Restoring Data (R285)

restore

Table 5-2 lists the arguments that modify the list of objects to be restored.
Table 5-2. The Modifying Arguments to the restore Command
Argument

Actions Modifying the Arguments

-replace

If a file in the destination location has the same path name as a file to be
restored, the former is replaced with the saved file. This also applies to
links. This argument is unnecessary if you give the -backup argument.

-first

The earliest rather than the latest copy of the saved file is restored. You
cannot give this argument if you give either the -backup or -trim
argument.

-trim

Use -trim if you are restoring data from multiple backups. It restores
the directory to its state at the time of the last backup. Thus, it deletes
objects that were deleted by users between the first and last of the
multiple backups. You cannot give both -trim and -first in the same
command.

-backup (Privileged)

1. Gives you temporary access to any object you need to overwrite.


2. Performs the -replace function, as described above. (-backup
also performs several other functions that do not modify the object
arguments.) You cannot give this argument if you give the -first
argument. You cannot give both -backup and -no_restore in the
same command.

Table 5-3 lists the arguments that determine where in the directory hierarchy the
objects will be restored.
Table 5-3. The Destination Arguments to the restore Command
Argument

Location the Objects Are Restored To

-destination path_name

The specified directory.

-same_place

The location defined by the save path name of each object


saved.

Both of the destination arguments

You cannot give both -destination and -same_place.

Neither of the destination arguments

The current directory.

Commands

5-19

restore

Restoring Indexed Files


You must use the save and restore commands to write an indexed file onto tape and
read it from tape. The write_tape command will not carry the index with the file.
If you do use write_tape for an indexed file, you can recreate an embedded-key
index with the create_index command (documented in the VOS Commands
Reference Manual (R098)). Separate-key indexes, however, will be lost and
embedded-separate-key indexes may be only partially rebuilt. If you use the
create_index command on a fixed file, you may get unexpected results. For
instance, deleted records will no longer be deleted.

Restore Path Names


To be restored, an object must have a restore path name. The basis of the restore path
name is the objects save path name, with the modifications outlined in Table 5-4.
Table 5-4. How the Operating System Determines Restore Path Names
Argument

Restore Path Name

-same_place

The save path name.

-source string

The save path name with string replaced by the current


directory name.

-source string and


-destination path_name

The save path name with string replaced by path_name.

-destination path_name

The save path name with the common path name replaced by
path_name.

None of these arguments

The save path name with the common path name replaced by
the current directory name.

5-20

VOS System Administration: Backing Up and Restoring Data (R285)

restore

Restore Conditions
The restore command can restore only those objects that meet certain criteria.
If the restore path name of the saved object does not conflict with the path name of
another object, restore has only two criteria that the saved object must meet.
The saved object must have a restore path name. (An object will not have a restore

path name if the string value given for the -source argument is less than a full
path name and cannot successfully combine with the common path name to form
a valid full path name.)
If you supply an object_names argument, the save path name of the name of the

object must match with at least one of the star names.


There are three types of saved objects: files, links, and directories. If the restore path
name of a saved file or link conflicts with the path name of another object, what the
operating system does depends on whether the objects with the conflicting names are
of the same type or different types.
If the name of a saved file or link conflicts with the name of another object of the

same type, the restore command restores the file or link only if you give the
-replace argument.
If the name of a saved file or link conflicts with the name of another object of a

different type, the restore command restores the saved file or link to a
temporary file. The restore command generates a unique name, with the suffix
.restore, for the temporary file and issues a message that the saved file or link
has been restored to this temporary file. You can then examine the restored file or
link and either rename it or delete it.
The restore command tries to recover all data on the save tape. When data is not
recoverable, restore records information about the missing data. The restore
command can restore missing data from other copies of the same save tape.

Related Information
See Chapter 4, Restoring Data from Logical Backups, which further describes how to
use the restore command.

Commands

5-21

save

save

5-

Purpose
The save command saves a set of files, directories, and links on magnetic tape or to
a disk file. The saved objects can be restored by the restore or the
restore_object command.

Display Form
------------------------------------- save -----------------------------------tape_device_or_port_name:
path_names:
-all_disks:
no
-volume_ids:
-number_of_volumes:
-date:
-modified:
-modified_since_saved:
no
-log:
-tape_log:
-after:
-backup:
no
-do_not_save:
-control_file:
-blocking:
7
-compression:
if_available
-unattended:
no

5-22

VOS System Administration: Backing Up and Restoring Data (R285)

save

Command-Line Form
save tape_device_or_port_name
path_names ...
-all_disks
-control_file path_name

[-volume_ids volume_ids ...]


[-number_of_volumes number]

-date date/time
-modified date/time

[-modified_since_saved]
[-log path_name]

[-tape_log path_name]
[-after number]

[-backup]

[-do_not_save names ...]

[-blocking blocking_factor]

[-compression]
[-unattended]

Arguments

* tape_device_or_port_name
Required
The name of a tape drive or a port attached to a tape drive or disk file.

* path_names
One or more path or star names of objects to save. You cannot give this argument
when you give either the -all_disks or the -control_file argument. If you
do not give one of these three arguments, the save command saves the current
directory.
The scope of this argument can be modified by a time argument or the
-do_not_save argument. See Table 5-5 later in this command description.

* -all_disks
<CYCLE> (Privileged)
Saves all objects on all of the currently accessible disks in the system. You cannot
give this argument when you give either the path_names or the -control_file
argument. If you do not give one of these three arguments, the save command
saves the current directory. The default value is no.
The scope of this argument can be modified by a time argument (see Table 5-5) or
the -do_not_save argument.
Commands

5-23

save

* -volume_ids volume_ids
Specifies a set of ANSI tape volume IDs. The command save uses the values only
if it writes the saved objects on magnetic tapes. If you do not supply tape volume
IDs when writing to tape, save asks you for a tape volume ID whenever it needs
to write a new tape. If you have already supplied the volume ID in a mount_tape
command, save does not ask you for it. If you have already mounted the tape with
the mount_tape command and you give the save command a volume ID that is
different from the volume ID on the mounted tape, save displays a message telling
you that the IDs do not match.
If you supply multiple tape volume IDs, they must be separated by spaces. If you
supply more tape volume IDs than are needed, the save command will use the first
volume IDs that you supplied. For example, if you supply five tape volume IDs
when the save command only needs four, the fifth tape volume ID will not be used.
If you use the -unattended argument, you must also use the -volume_ids
argument.

* -number_of_volumes number
Specifies the number of tape volumes to be saved. The number must be a value
between 2 and 255. If you specify this argument, you must also specify the
-volume_ids argument.

* -date date/time
Saves only the objects that have not been saved since a given date and time. The
save command disregards this argument except when it is saving the contents of
a directory. You cannot give this argument when you give either the -modified or
the -modified_since_saved argument. The value for the date/time
argument must be given in one of the standard operating system date/time formats
as follows:
continuous string:

yy-mm-dd_hh:mm:ss
For example: 95-02-01_11:05:59
string enclosed in apostrophes:

yy-mm-dd hh:mm:ss
For example: 95-02-01 11:05:59
You can also include a time zone designation as part of the string. If you do not
include a time zone, the save command uses your processs default time zone.
See the Differences between Time Zones table in the description of the
set_time_zone command in VOS Commands Reference Manual (R098) for
information about how to set the time zone for your process.
5-24

VOS System Administration: Backing Up and Restoring Data (R285)

save

* -modified date/time
Saves only the objects modified since a given date and time. The save command
disregards this argument except when it is saving the contents of a directory.
You cannot give this argument when you give either the -date or the
-modified_since_saved argument.
The date/time value must be given in one of the forms shown for the -date
argument.

* -modified_since_saved
<CYCLE>
Saves only the objects that have been modified since they were last saved. The
default value is no.
The save command disregards this argument except when it is saving the
contents of a directory. You cannot give this argument when you give either the
-date or the -modified argument. Normally this argument is given only in
conjunction with the -backup argument, from a privileged process.

* -log path_name
Creates a file with the specified path name in which it logs information about every
object saved. The save command opens the log file for I/O type append, so it does
not overwrite any data in the file.
See Chapter 4, Restoring Data from Logical Backups, for an excerpt from a log
file.

* -tape_log path_name
Creates a file with the specified path name in which it logs the volume IDs of the
save tapes. The save command disregards this argument if you are not saving the
objects on tape. The save command opens the tape log file for I/O type append,
so it does not overwrite any data in the file.
See Chapter 4, Restoring Data from Logical Backups, for an example of a tape
log file.

* -after number
Saves the objects periodically during the save. If you give this argument, save first
saves all the objects selected with the other arguments. Then every number
minutes, it resaves any object (from the set of objects it is looking at) that was
modified since it was last saved. The command continues to save modified objects
periodically until you interrupt or stop the process executing the command.
Never give this argument without also giving the -backup argument because the
date-time-saved value of saved objects is not updated.

Commands

5-25

save

* -backup
<CYCLE> (Privileged)
Performs two functions that are important for performing backup:
save overrides the access control mechanism to save objects to which you do

not have the proper access. See Rule 4 under the heading The Rules for
Saving Objects in the Explanation section of this command description.
save updates the date-time-saved value of each object saved. Unless your

process is privileged, you cannot give this argument.


The default value of this argument is no.

* -do_not_save names
Specifies one or more named objects that the save command is not to save. Each
value must be an object name; it cannot be a path name. Any of the values can be
a star name. An object name cannot exceed 32 characters in length.

* -control_file path_name
Saves the objects specified in the file designated by path_name. Each object
named in the file must be listed on a separate line.

You can include comments in a save control file by placing the characters /*
before the text of a comment as a comment indicator. All text on the line following
the comment indicator are treated as a comment and are not processed. No
closing comment indicator is needed. If you want a comment to span more than
one line in a control file, you must include a comment indicator at the beginning of
the text of the comment on each line containing the comment.
You cannot give this argument when you give either the path_name or the
-all_disks argument. If you do not give one of these three arguments, the save
command saves the current directory.
The scope of this argument can be modified by a time argument or the
-do_not_save argument. See Table 5-5.

* -blocking blocking_factor
A number that sets the size of blocking to be used by the save command when
writing to tape. The value of blocking_factor must be an integer from 1 to 7.
The default is 7. You should never need to change the default.

* -compression
<CYCLE>
Enables you to select data compression if you have a tape drive that supports data
compression. Note, however, that the compressibility of data may vary widely. If
you are using either the T402-001 or T402-002 tape drive, each cartridge will
typically contain two to three times the equivalent of uncompressed data.
However, some data patterns may compress slightly or not at all. The default is
if_available.

5-26

VOS System Administration: Backing Up and Restoring Data (R285)

save

* -unattended
<CYCLE>
Suppresses the save prompts so that more than one tape can be saved to without
user intervention. The default value is no. When you invoke this argument, you
must also give the -volume_ids argument, listing the tapes to be used.
If you need to create volumes, invoke either the create_tape_volumes
command or the mount_tape -create_volume command before invoking
save -unattended. Both of these commands are documented in VOS
Commands Reference Manual (R098).

Explanation
The save command saves a specified set of objects files, directories, and links
with all their attributes. The save command copies the objects and information about
them to the tape or disk file attached to a specified port. The major use of save is for
periodic backup of the entire system. See Chapter 2, Backing Up Data, for
information about backup procedures. A privileged user can use the save command
to back up all the objects in a module or a system.
The save command works with tapes that use the ANSI format. If you try to use the
save command with a tape drive that is already mounted and is using a different format
than ANSI, you will receive the e$invalid_save_tape_format error message. In
order to use the save command with that tape drive, you must give the
set_tape_mount_params command with the -tape_format argument set to
ANSI. For more information about this command, refer to the
set_tape_mount_params command description in VOS Commands Reference
Manual (R098).
A related command, save_object, saves one object (which could be an entire
directory hierarchy) on tape or disk. See VOS Commands Reference Manual (R098)
for information about save_object.
You can restore saved objects either to their former locations in the directory hierarchy
or to new locations. See Chapter 2, Backing Up Data, and the description of the
restore command for information about restoring saved objects. You can also
restore a single saved object (which can be an entire directory hierarchy) with the
restore_object command, described in VOS Commands Reference
Manual (R098).
Before issuing the restore or restore_object command, give the verify_save
command to verify that the save file, save tape, or object saved earlier with a save or
save_object command, can be read and restored with the restore command. The
verify_save command is described in VOS Commands Reference Manual (R098).
The save command can attach a port and mount a tape. When save performs these
actions, it also automatically detaches the port on completion of the process.

Commands

5-27

save

Saving Indexed Files


You must use the save command to write an indexed file onto tape, since the
write_tape command will not carry the index with the file.
If you use write_tape for an indexed file, you can re-create an embedded-key index
with the create_index command (documented in VOS Commands Reference
Manual (R098)). Separate-key indexes, however, will be lost and
embedded-separate-key indexes may be only partially rebuilt. If you use the
create_index command on a fixed file, you may get unexpected results; for
instance, deleted records will no longer be deleted.
The display_file_status command shows index
names in order of the index address inside the file. This
order may change if the file is specified as the subject of
the copy_file, move_file, restore_object, or
save_object command.

The Rules for Saving Objects


1. The save command always saves the objects named in the command line. This
means that:
All files named in the path_names argument will be saved.
All objects listed in a control file associated with the command will be saved.
For a directory named in the path_names argument or in the file specified by

the -control_file argument, the save command always saves the


directory itself (that is, the directorys attributes). But each object in the
directory is saved only if it meets the criteria of the other arguments.
With the -all_disks argument, the save command saves each directory

hierarchy in the system (that is, it saves the attributes of each directory
hierarchy).
2. When the save command saves a link, it saves the link itself (that is, the attributes
of the link), and issues a warning that it saves only the link, not the links target.
3. The save command does save temporary files. (You can identify a temporary file
by its name, which either begins with an underline or ends with the suffix .temp.)
If you do not want to save temporary files, use the -do_not_save argument.
save %s1#tape.1.0 -do_not_save _*

*.temp

The preceding command will save all files in the current directory except temporary
files.
4. A non-privileged process must have read or write access to files and status or
modify access to directories in order to save them. A privileged process can give
the -backup argument to override these access restrictions.
5-28

VOS System Administration: Backing Up and Restoring Data (R285)

save

5. The save command saves files that are locked for writing by using the following
procedure: when it comes to the end of a file locked for writing, it checks to
determine if any of the files pages were modified during the save and then resaves
those pages. It then checks again for modified pages, saving any that it finds. It
continues looping in this manner until it completes a pass during which no pages
were modified. Note that if a file to be saved is extensively modified during the save
operation, this increases the time necessary to complete the save and the space
used by the save (since some pages might be saved many times).
If save is unable to follow this procedure, it will not save a file locked for writing and
will make a second pass later to try again.
Before working with the save command, you must have a thorough understanding of
path names, save path names, and common path names. If you have any questions
about path names, see the section Objects in Chapter 1 of this manual. If you still
have questions, see VOS Reference Manual (R002) for more information on objects
and path names.

Arguments Table
Table 5-5 shows the time and objects arguments to the save command and how they
interact. The table refers to a complete save, supportive save, consolidated save, and
an incremental save. For descriptions of these terms, see the section Using the Time
Factor Arguments in Regular Backups in Chapter 2, Backing Up Data.

Commands

5-29

save

Table 5-5. The Interaction of the Time and Objects Arguments to the save Command
Time Argument
No Time
Argument
Complete Save

Object
Argument

-date
date/time
Supportive
Save

-modified
date/time
Consolidated
Save

-modified_
since_saved
Incremental Save

path_names

The designated
files, directories,
and links.

All objects (from


those
designated) not
saved since the
specified
date/time.

All objects (from


those
designated)
modified since
the specified
date/time.

All objects
(from those
designated)
modified since last
saved.

-all_disks
(Privileged)

All objects on all


disks.

All objects in the


system not saved
since the
specified
date/time.

All objects in the


system modified
since the
specified
date/time.

All objects in the


system modified
since the last save.

-control_file
path_name

All objects
specified in
path_name.

All objects (from


those
designated) not
saved since the
specified
date/time.

All objects (from


those
designated)
modified since
the specified
date/time.

All objects
(from those
designated)
modified since the
last save.

None of the objects


arguments.

The contents of
the current
directory.

The contents of
the current
directory not
saved since the
specified
date/time.

The contents of
the current
directory
modified since
the specified
date/time.

The contents
of the current
directory modified
since the last save.

-do_not_save
name

Designates objects not to be saved from among those objects that meet the
criteria of the other objects arguments.

To update the date-time-saved value of objects, use the -backup argument. This

argument can only be used if yours is a privileged process. The operating system
can save objects to which you do not have access and update the date-time-saved
value of each object it saves.
To resave objects that have been modified during a save, use the -after

number_of_minutes argument. The operating system then saves the objects


(as defined by the objects argument) that have been modified since the last save.
Always give the -backup argument when you give -after.

5-30

VOS System Administration: Backing Up and Restoring Data (R285)

save

Examples
Figure 1-1 showed a sample directory hierarchy. The figure depicted the directory
structure used in the following examples.
To save all of the directory Clark, do one of the following:
Specify the path name >Accounting>Clark as the path_names argument as

shown in the following example.


save %s1#tape.1.0 >Accounting>Clark
Change your current directory to the Clark directory and issue the save

command as shown in the following example.


save %s1#tape.1.0
To save the Clark and Carlson directories, but not the file ledger, do the following.
save %s1#tape.1.0 >Accounting>C* -do_not_save ledger
To save the two files named finance, you must specify the full path name of each.
save %s1#tape.1.0 %s1#d01>Accounting>Clark>finance
%s1#d01>Accounting>Carlson>finance
For information on calculating the number of reels or cartridges of tape you need, see
Appendix H Estimating the Number of Blocks on a Tape in VOS Tape Processing
Users Guide and Programmers Reference (R052).

Related Information
See Chapter 2, Backing Up Data.

Commands

5-31

save

5-32

VOS System Administration: Backing Up and Restoring Data (R285)

Appendix A
Quick Reference:
Characteristics of Logical and
Physical Backup

A-

Table A-1 describes the differences between logical and physical backup.
Table A-1. Differences Between Logical and Physical Backup
Item

Logical Backup

Physical Backup

Commands for Saving Objects

save, save_object

dump_disk

Commands for Retrieving


Objects

restore, restore_object

reload_disk

Selective Recovery of Objects

yes

no

ACLs, DCLs Saved?

yes

no

File Indexes Saved?

yes

no

Date-Time-Saved Values
Updated?

yes

no

Can Save Tape Be Used as a


Boot Tape?

no

yes

Mode of Dump

by files and directories

by physical block

Speed of Operation

slower

faster

The save command compresses files and directories scattered all over the disk into
contiguous blocks on the tape.

Quick Reference: Characteristics of Logical and Physical Backup

A-1

Quick Reference: Characteristics of Logical and Physical Backup

A-2

VOS System Administration: Backing Up and Restoring Data (R285)

Index

A
Access control lists
restoring, 5-14
saving, 2-1
Access overrides in data restores, 4-6
ANSI tape formats, 5-27
Attaching ports to tape drives, 2-1, 4-2
Attribute saves, 5-27
Automatic tape mounting, 2-1, 4-2, 5-3

B
Backup, 2-1, 5-27
command macros for, 2-19
differences between logical and
physical, 1-1
log files, 4-9, 4-11, 4-13
creating, 2-11
logical, 2-1
save command, 1-1
nonduplex disks, 2-18
physical, 2-16
dump_disk command, 1-1
resave log files, 2-13
schedules for, 3-1, 4-14
systems
with frequently modified files, 3-1
with rarely modified files, 3-2
tape log files, 2-11, 4-10, 4-11
tapes, 2-11
labeling, 3-3
-backup argument
and the restore command, 4-6
and the save command, 2-4
Bad blocks, 4-18
Bimonthly dumps of the master disk, 3-2
Biweekly consolidated saves, 3-2
Block dumps to tape, 5-7
Block size, 2-15
Boot disk restoration, 4-19

Boot tape creation, 2-17


broadcast command, 5-7

C
Cartridge capacity
T401/T402, 2-15
Changing
tape drives during a save, 2-14
tape reels during a save, 2-14
Command macros, 2-19
Commands
copy_tape, 5-2
create_tape_volumes, 2-12
display_disk_usage, 2-15, 2-18
dump_disk, 2-16
reload_disk, 4-1, 4-15
restore, 5-10
restore_object, 4-1
save, 2-1, 5-22
set_pipe_file, 4-23
verify_save, 3-4, 4-2, 5-16, 5-27
Common path names, 1-3, 5-11
Complete saves, 2-4, 3-2
all objects
in specified directories, 2-9
on an entire disk, 2-5
restoring, 4-16
-compression argument, 5-6, 5-26
Consolidated saves, 2-4, 3-2
of an entire disk, 2-6
Control files for saves, 2-8, 2-9, 5-26
copy_tape command, 5-2
Copying
directories with pipe files, 4-23
logical volumes to tapes, 2-16, 5-5
tapes, 4-25, 5-2
create_tape_volumes command, 2-12
Creating
backup log files, 2-11
boot tapes, 2-17
Index-1

Index-

Index
log files of the save command, 2-10
save tapes, 2-2
tape log files, 2-11
tape volumes, 2-12
Current directory
restoring to, 4-7
saving objects from, 2-8

D
Daily incremental saves, 3-2
Data compression, 2-15
Data restoration, 4-1
Date-time-saved value, 5-14
dump_disk command, 2-16
formats for, 5-24
updating, 2-4, 2-7
Default access control list saves, 2-1
Density, 5-2
Destination specified in restore, 4-7
Destination tapes, 5-2
Determining cartridges needed for a
save, 2-15, 2-18
Directories
copying with pipe files, 4-23
hierarchy of, 1-2
saving objects in current, 2-8
specifying the one to restore, 5-12
Disk directory, 1-2
Disks
bad blocks, 4-18
contents of, 1-2
dumping, 2-16, 5-7
using the T401/T402 tape drive, 2-18
reloading, 4-1
restoring, 4-14
attached to IOPs, 4-17
boot, 4-19
contents of, 3-3
nonboot, 4-15
nonduplex, 4-16
saving
all objects, 2-8, 5-23
complete save, 2-5
consolidated save, 2-6
incremental save, 2-6
nonduplex, 2-18
supportive save, 2-7
display_disk_usage command, 2-15, 2-18

Index-2

Displaying the contents of a save tape, 4-13


dump_disk command, 2-16
physical backup, 1-1
required arguments for, 2-16
Dumping, 2-16
disks
master, 2-17, 3-2
using the T401/T402 tape drive, 2-18

E
End-of-tape, 5-3
Errors, 2-13
Excluding objects from a save, 2-10, 5-26
Extent-based files, 5-15
restoring, 4-8

F
Files
extent-based, 5-15
log, 5-25
pipe, 4-23
restoring
and packing, 5-13
extent-based, 4-8
indexed, 5-20
saving
indexed, 5-28
locked, 5-29
temporary, 5-28
tape log, 5-25
updating the date-time-saved value
for, 2-4
Formats for date and time, 5-24
Full path names, 1-2

I
Implicit attachments, 2-1, 4-2, 5-3
Improving performance, 5-3
Incremental saves, 2-4, 3-2
of an entire disk, 2-6
restoring, 4-16
Indexed files, 2-1, 5-20, 5-28
IOPs and restoring the attached disks, 4-17

L
Labeling backup tapes, 3-3

VOS System Administration: Backing Up and Restoring Data (R285)

Index
Links, 5-28
Listing save path names, 5-12
Loading tape drives, 4-2
Locating objects in large log files, 4-11
Locked files, 5-29
Log files, 5-25
backup, 2-11, 4-9, 4-11, 4-13
created by save, 2-10
locating objects in, 4-11
resave, 2-13
tape, 2-11, 4-10, 4-11, 5-25
Logical backup
advantages over physical backup, 1-1
save command, 1-1
Logical volumes, 1-1
copying to tape, 2-16, 5-2, 5-5

M
(master_disk)>system directory, 4-18
dumping, 2-17
restoring contents, 4-18
Modules
10- and 40-slot modules
manually starting up, 4-19, 4-21
6-slot modules
manually starting up, 4-19
Monthly complete saves, 3-2
Monthly physical dumps, 3-2
Mounting tapes, 2-15
Multiple tapes
and the restore command, 4-3
copying simultaneously, 4-25
dumping disks to, 2-18
saving, 2-12
sequentially, 2-15
Multitape saves, 5-6, 5-15, 5-27

N
Names, 5-20
Nonduplex disks
restoring, 4-16

O
Objects, 1-2
arguments, 2-8, 5-29
excluding from a save, 2-10, 5-26
names of, 5-20

resaving ones modified during the


save, 2-7
restoring, 4-11, 5-10, 5-27
all objects on a tape, 4-4
to a specified directory, 4-7
to the current directory, 4-7
to their previous locations on disk, 4-8
saving, 2-8, 5-22, 5-27
all objects on all disks, 2-8
found in specified directories, 2-8
from a disk, 2-8
from the current directory, 2-8
specified, 2-3
those modified since a given
date, 5-25
those modified since the last
save, 5-25
specifying to be restored, 4-3, 4-4
from a directory, 4-4
from multiple directories, 4-4
updating the date-time-saved value
of, 5-26
verifying existence of, 5-27
Objects arguments
and the restore command, 4-3
modifying arguments of, 4-5
Overriding access requirement, 4-6

P
Packing restored files, 5-13
Partial saves, 2-4, 2-6
Path names, 1-2
restore, 5-20
saving all objects in, 2-9
specifying to restrict which objects to be
saved, 2-8
Performance, 5-3
Physical backup, 2-16, 3-2
advantages over logical backup, 1-1
dump_disk command, 1-1
Physical disks, 1-1
Pipe files, 4-23
Ports, 5-2
attaching
before issuing dump_disk, 2-16
for saves, 2-11
implicitly, 2-1, 4-2, 5-3
to tape drives, 2-1, 4-2

Index-3

Index
Privileged command restrictions, 3-3
Privileged processes, 2-5
Prompt suppression, 5-6, 5-15, 5-27

R
recover_disk command, 5-8
Recovering
a disk, 3-3
deleted record space, 4-8
Recreating indexed files, 5-28
Registering users, 3-3
reload_disk command, 4-1, 4-15, 5-6
Resave log files, 2-13
Restarting a save, 2-13
restore command, 4-1, 5-10
-backup argument, 4-6
modifying arguments, 4-5
required argument for, 4-1
Restore path names, 5-20
restore_dir directory, 4-7
restore_object command, 4-1
Restoring
access control lists, 5-14
all objects on a tape, 4-4
data, 4-1
automatic mounting for, 4-2
multiple restore operations, 4-14
specifying the directory, 5-12
disks
attached to IOPs, 4-17
boot, 4-19
complete contents of, 4-14
nonboot, 4-15
nonduplex, 4-16
files
and packing, 5-13
extent-based, 4-8
indexed, 5-20
objects, 4-11, 5-10, 5-27
latest version of, 5-13
to a specified directory, 4-7
to the current directory, 4-7
to their previous locations on disk, 4-8
saves
complete, 4-16
incremental, 4-16

Index-4

specified objects, 4-3, 4-4


from a directory, 4-4
from multiple directories, 4-4
to a specified location, 4-7
Restricting
backup and save users, 3-3
objects to be saved
by date-time-saved value, 2-6
by path names, 2-8
to those listed in a control file, 2-8
Rewinding tapes simultaneously, 5-3

S
save command, 2-1, 5-22
and privileged processes, 2-5
cartridge capacity, 2-15
logical backup, 1-1
objects arguments, 2-8, 5-29
restarting, 2-13
time arguments, 2-3, 5-29
Save path names, 1-2
listing, 5-12
Save tapes
creating, 2-2
displaying the contents of, 4-13
Saves
automatic mounting for, 2-1
biweekly consolidated, 2-4, 3-2
daily incremental, 2-4, 3-2
of an entire disk, 2-6
monthly complete, 2-4, 3-2
of an entire disk, 2-5
monthly physical dumps, 3-2
multivolume, 2-12
partial, 2-4
supportive
of an entire disk, 2-7
unattended, 5-27
weekly consolidated, 3-2
of an entire disk, 2-6
Saves, unattended, 5-6, 5-15
Saving
access control lists, 2-1
all disks, 2-18, 5-23

VOS System Administration: Backing Up and Restoring Data (R285)

Index
all objects
different methods for saving, 2-9
in a specified path name, 2-9
on a disk, 2-8
on all disks, 2-8
current directory, 2-8
indexed files, 5-28
links, 5-28
locked files, 5-29
log files, 2-10
master disk
dumps of, 3-2
objects, 5-22
attributes of, 5-27
in directories, 2-8
listed in a control file, 2-8, 2-9
modified since a given date, 5-25
modified since last save, 5-25
resaving those modified during a
save, 2-7
specified, 2-3, 2-8
verifying, 4-2
one object, 5-27
restricting objects from, 2-10
tapes
using multiple, 2-15
temporary files, 5-28
the master disk, 2-17
variable-length logical records, 2-13
Schedules for backup, 3-1, 4-14
set_pipe_file command, 4-23
Specifying
objects to exclude from a save, 2-10
objects to restore, 4-3, 4-4
from a directory, 4-4
from multiple directories, 4-4
objects to save, 2-3, 2-8
tape density, 5-2
tape formats, 5-27
tape volume IDs, 2-12
start_up.cm file
requirement, 3-3
Startup
manual
on 10- and 40-slot modules, 4-19,
4-21
on 6-slot modules, 4-19
Suffixes
.this_tape, 2-13

Supportive save of an entire disk, 2-7


Suppressing prompts, 5-6, 5-15, 5-27
syserr_log.(date) file, 3-4

T
T401/T402 cartridge capacity, 2-15
T401/T402 tape drives, 2-18, 5-6, 5-15, 5-27
Tape blocks
calculating the length of, 5-9
Tape density, 5-2
and the dump_disk command, 5-6
Tape drives, 2-11
changing during a save, 2-14
loading, 4-2
T401/T402, 5-6, 5-15, 5-27
Tape errors, 2-13
Tape files, 2-13
Tape formats
ANSI, 5-27
Tape log files, 4-11, 5-25
creating, 2-11
Tape mounting, 2-15
automatic, 5-3
for backup, 2-11
Tape reel changes during a save, 2-14
Tape volume creation, 2-12
tape_device_or_port_name argument
required for the restore command, 4-1,
5-11
required for the save command, 5-23
Tapes
backup, 1-1
labeling, 3-3
calculating the amount of data stored
on, 5-9
copying, 4-25, 5-2
logical volumes to, 2-16, 5-5, 5-22
errors recorded in
syserr_log.(date), 3-4
saving using multiple, 2-15
unreadable portions of, 4-3
using more than one in a save, 2-12
volume IDs
specifying, 2-12
with restore, 4-2
Temporary files
not saving, 2-10
saving, 5-28

Index-5

Index
.this_tape suffix, 2-13
Time
setting for the save command, 2-3
zones, 5-24
Time arguments, 5-29
for the save command, 5-24
Troubleshooting
disk size for restores, 4-18
restore command
multiple tape volumes, 4-3
tapes or bad tape drives, 2-14
unreadable tape, 4-3

U
Unattended saves, 5-6, 5-15, 5-27
Updating the date-time-saved value of
objects, 2-4, 5-26
Users, 3-3

V
Variable-length logical records, 2-13
verify_save command, 3-4, 4-2, 5-16, 5-27
Volume creation with the copy_tape
command, 5-3
Volume IDs, 2-2
specifying
for a save, 2-12, 5-24

W
Weekly consolidated saves, 3-2

Index-6

VOS System Administration: Backing Up and Restoring Data (R285)

Das könnte Ihnen auch gefallen