VOS backup and restoring data (r285-03)

download VOS backup and restoring data (r285-03)

of 42

Transcript of VOS backup and restoring data (r285-03)

  • 8/20/2019 VOS backup and restoring data (r285-03)

    1/114

    Stratus Computer, Inc.

    R285-03

    VOS System Administration:

    Backing Up and Restoring Data

  • 8/20/2019 VOS backup and restoring data (r285-03)

    2/114

     

    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-systemcommands 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.

  • 8/20/2019 VOS backup and restoring data (r285-03)

    3/114

      Contents iii

    Contents

    Preface   ix

    1. Introduction to Backup 1-1Types of Backup 1-1

    Objects 1-2

    Path Names 1-2Save Path Names 1-2

    Common Path Names 1-3

    2. Backing Up Data 2-1

    Logical Backup: The save Command 2-1

    The Steps in a Save 2-2

    Using the Time Factor Arguments in Regular Backups 2-3

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

     Argument 2-4Performing a Complete Save of an Entire Disk 2-5

    Performing an Incremental Save of an Entire Disk 2-6Performing a Consolidated Save of an Entire Disk 2-6

    Performing a Supportive Save of an Entire Disk 2-7Performing a Save While Users Are Working on the

    Module 2-7

    The Objects Arguments 2-8Saving All Objects in the Current Directory 2-8

    Saving All Objects on a Disk 2-8

    Saving All Objects on All Disks 2-9

    Saving All Objects in a Specified Path Name 2-9Saving All Objects Listed in a Control File 2-9Specifying Objects Not to Save 2-10

    The Log Arguments 2-10

    Backup Log Files 2-11Tape Log Files 2-11

  • 8/20/2019 VOS backup and restoring data (r285-03)

    4/114

    Contents

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

    Using Tapes 2-11

    Preparation 2-11Specifying Tape Volume IDs 2-12

    Restarting a Save 2-13The Resave Log File 2-13

    Responding to a Save Interrupt 2-14

    Using the T401/T402 Tape Drive for Multitape Saves 2-15Physical Backup: The dump_disk Command 2-16

    The dump_disk Arguments 2-16

    Dumping the Master Disk 2-17Dumping All the Disks in a Module 2-18

    Using the T401/T402 Tape Drive with the dump_disk 

    Command 2-18

    Using Command Macros for Backup 2-19

    3. Backup Operations 3-1

    Planning a Backup Schedule 3-1

    Schedule 1 3-1Schedule 2 3-2

    Restricting Operators to Backup and Restore 3-3

    Keeping Backup Records 3-3

    4. Restoring Data from Logical Backups 4-1

    Retrieving Backed-Up Data: Therestore

     Command 4-1The Steps in Data Retrieval 4-2

    Selecting the Objects to Restore 4-3Restoring Objects from a Specified Directory 4-4

    Restoring Objects from Multiple Directories 4-4

    Restoring Specified Objects 4-4Restoring All Objects on a Tape 4-4

    Modifying the Objects Arguments 4-5

    Using the -backup Argument 4-6Restoring Objects to Specified Locations 4-7

    Restoring Objects to a Specified Directory 4-7

    Restoring Objects to the Current Directory 4-7Restoring Objects to Their Previous Locations on Disk 4-8

    Miscellaneous Arguments 4-8Log Files 4-9

    Backup Logs 4-9

    Tape Logs 4-10

  • 8/20/2019 VOS backup and restoring data (r285-03)

    5/114

    Contents

      Contents v

    Restoring an Object Other Than the Top Directory of a Disk 4-11

    Locating the Object Using Backup Logs and Tape Logs 4-11

    Creating a Backup Log Using restore Arguments 4-13

    Restoring the Object 4-14

    Multiple Restore Operations 4-14Retrieving the Complete Contents of a Disk 4-14

    Retrieving the Contents of a Nonboot Disk 4-15Retrieving the Contents of a Master Disk 4-18

    Using Pipe Files to Copy or Move Directories 4-23

    Copying Tapes 4-25

    5. Commands 5-1

    copy_tape 5-2

    dump_disk 5-5

    restore 5-10

    save 5-22

    Appendix A. Quick Reference: Characteristics of Logical and Physical

    Backup A-1

    Index Index-1

  • 8/20/2019 VOS backup and restoring data (r285-03)

    6/114

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

    Figures

    Figure 1-1. A Sample Directory Hierarchy 1-4

  • 8/20/2019 VOS backup and restoring data (r285-03)

    7/114

      Tables vii

    Tables

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

    Table 5-2. The Modifying Arguments to the restore Command 5-19Table 5-3. The Destination Arguments to the restore Command 5-19

    Table 5-4. How the Operating System Determines Restore Path

    Names 5-20Table 5-5. The Interaction of the Time and Objects Arguments to the

    save Command 5-30

    Table A-1. Differences Between Logical and Physical Backup A-1

  • 8/20/2019 VOS backup and restoring data (r285-03)

    8/114

    Tables

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

  • 8/20/2019 VOS backup and restoring data (r285-03)

    9/114

      Preface  ix

    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 VOSRelease 14.0.0.

    Related Manuals

    Refer to the following Stratus manuals for related documentation.

    • VOS Tape Processing User’s Guide and Programmer’s Reference (R052)

    • Tape User’s Quick Reference Guide (R075)

    • VOS System Administration: Disk and Tape Administration (R284)

    • T401/T402 Tape Drive User’s 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 wasbooted.

    • 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 terminal’s screen (such ascommands, subroutines, code fragments, and names of files and directories).For example:

    change_current_dir (master_disk)>system>doc

  • 8/20/2019 VOS backup and restoring data (r285-03)

    10/114

    Preface 

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

    • 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 literalvalue.

    list_users -module module_name 

    • Monospace bold represents user input in examples and figures that contain bothuser 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. Toperform a function, you press the appropriate key(s) from the command-line or displayform. 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  and  keys simultaneouslyto perform the INTERRUPT function; on a V105 PC/+ 106 terminal, you press the  keyon the numeric keypad to perform the INTERRUPT function.

    Certain applications may define these keys differently.Refer to the documentation for the application for thespecific key mappings.

  • 8/20/2019 VOS backup and restoring data (r285-03)

    11/114

    Preface

      Preface  xi

    The following table lists several VOS functions and the keys to which they are mappedon 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 ofsoftware 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, referto the documentation for that terminal.

    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 notnecessarily include all of the following sections.

    VOS Function

    V103

    ASCII

    V103

    EPC

    IBM PC or

    Compatible

    PC

    V105

    PC/+ 106

    V105

    ANSI

    CANCEL     * †

    † Numeric-keypad key

    * †  † or * †  

    CYCLE       -  †  

    CYCLE BACK   -  -  -  † - 

    DISPLAY FORM     -†

    -†

      †

     or -†

     or- 

    HELP   -  -  -  -   

    INSERT DEFAULT   -  -  -  -   

    INSERT SAVED            

    INTERRUPT   -  -  -  † - 

    NO PAUSE   -  - * †  -

      † - 

  • 8/20/2019 VOS backup and restoring data (r285-03)

    12/114

    Preface 

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

    name

    The name of the command or request is at the top of the first page of the

    description.

    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.)

    Purpose

    Explains briefly what the command or request does.

    Display FormShows the form that is displayed when you type the command or request namefollowed 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

     add_disk   Privileged 

      PurposeThe add_disk command tells the operating system on the currentmodule to recognize the specified logical volume for the duration ofthe current bootload.

    Display Form

      Command Line Form

    add_disk disk_name[ module_name ]

      Argumentsdisk_name

    The name of the logical volume to be recognized for the currentbootload.

      .  .  .

    H

    AB

    C

    D

    E

    F

    G

      -------------------------- add_disk -------------------------  disk_name:

      module_name: current_module

    Required

    A

    B

    C

    D

  • 8/20/2019 VOS backup and restoring data (r285-03)

    13/114

    Preface

      Preface  xiii

    argument has a default value, that value is displayed in the form. (See the onlineglossary for the definition of default value.)

    The following table explains the notation used in display forms.

    The Notation Used in Display Forms 

    Command-Line FormShows the syntax of the command or request with its arguments. You can displayan 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 starname. (See the online glossary for the definition of star name.) When you specifymultiple values, you must separate each value with a space.

    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 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.

    a

    E

  • 8/20/2019 VOS backup and restoring data (r285-03)

    14/114

    Preface 

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

    The Notation Used in Command-Line Forms 

    Arguments

    Describes the command or request arguments. The following table explains thenotation used in argument descriptions.

    The Notation Used in Argument Descriptions

    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 specifyone of these arguments.[argument_1]  Optional argument.[argument_1]... 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.

    Notation Meaning

      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 labeledRequired since you do not need to specify it in the command-line

    form. However, in the display form, a required field must have a

    value—either the displayed default value or a value that you

    specify.

    (Privileged) Only a privileged process can specify a value for this argument.

    argument_1

    argument_2 

    argument_1

    argument_2 

    F

    G

  • 8/20/2019 VOS backup and restoring data (r285-03)

    15/114

    Preface

      Preface  xv

     The following additional headings may appear in the command or requestdescription: Explanation, Error Messages, Examples, and Related Information.

    ExplanationExplains how to use the command or request and provides supplementary

    information.

    Error MessagesLists common error messages with a short explanation.

    Examples

    Illustrates uses of the command or request.

    Related InformationRefers you to related information (in this manual or other manuals), including

    descriptions of commands, subroutines, and requests that you can use with or inplace 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 toStratus manuals and a glossary of terms.

    • Stratus offers some of its manuals online, via StrataDOC, an online-documentationproduct that consists of online manuals and StrataDOC Viewer, delivered on a

    CD-ROM (note that you must order StrataDOC separately). StrataDOC Viewerallows you to access online manuals from an IBM PC or compatible PC, a Sun ®  or

    Hewlett-Packard workstation, or an Apple ®  Macintosh ®  computer. StrataDOCprovides such features as hypertext links and, on the workstations and PCs, textsearch 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 moreinformation about StrataDOC, contact your Stratus account representative.

    H

  • 8/20/2019 VOS backup and restoring data (r285-03)

    16/114

    Preface 

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

    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, ordistributor; see the file cac_phones.doc in the directory >system>doc for CACphone 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 bycompleting 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 yoursystem is not connected to the RSN, you must use the customer survey to commenton this manual.

    The comment_on_manual command is documented in the manual VOS System

    Administration: Administering and Customizing a System (R281) and the VOSCommands 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  or , andcomplete the data-entry form that appears on your screen. When you have

    completed the form, press .

    • If your comments are lengthy, save them in a file before you issue the command.

    Type comment_on_manual followed by -form, then press  or . Enterthis manual’s 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 .

    If comment_on_manual does not accept the partnumber of this manual (which may occur if the manual is

  • 8/20/2019 VOS backup and restoring data (r285-03)

    17/114

    Preface

      Preface  xvii

    not yet registered in the manual_info.table file), youcan 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.

  • 8/20/2019 VOS backup and restoring data (r285-03)

    18/114

    Preface 

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

  • 8/20/2019 VOS backup and restoring data (r285-03)

    19/114

      Introduction to Backup  1-1

    Chapter 1

    Introduction to Backup1-

    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 system’s disks. The purpose ofbackup 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 modulewhen needed.

    There are two types of backup, logical and physical. Logical backup  is performed withthe 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 savedobjects.

    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 ashort time during a physical backup.

    The dump_disk command writes entire logical volumes to tape. A logical volume  isone 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 theinformation about logical volumes in VOS System Administration: Disk and TapeAdministration (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 User’s Guide andProgrammer’s Reference (R052).

  • 8/20/2019 VOS backup and restoring data (r285-03)

    20/114

    Objects 

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

    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 objectconsists of all the contents of a disk. If you give the name of a logical volume to bebacked 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 bythe 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, andprecedes 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 forthe file named reports.

    %s1#d01>Accounting>Carlson>reports 

    The file is immediately contained in the home directory Carlson, which is subordinateto the group directory Accounting. The Accounting directory is a subdirectory onthe 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 savepath 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 theobject’s 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.

  • 8/20/2019 VOS backup and restoring data (r285-03)

    21/114

    Objects

      Introduction to Backup  1-3

    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 operatingsystem 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 pathname.

    • If save cannot find a directory name for the common path name, it sets thecommon 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 youwant 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 orsave tape.

    • The restore command can construct a common path name by combining a pathname 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 inthe -source argument.

    Figure 1-1 shows a sample directory hierarchy.

  • 8/20/2019 VOS backup and restoring data (r285-03)

    22/114

    Objects 

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

    Figure 1-1. A Sample Directory Hierarchy

    cp0279

    Subdirectories Files

    d01

    s1

    Sales Accounting

    Subdirectories

    Smith Jones Clark Carlson ledger

    FilesFilesFilesFiles

    customers commissions prospects programs reports recordsfinance finance

  • 8/20/2019 VOS backup and restoring data (r285-03)

    23/114

    Objects

      Introduction to Backup  1-5

    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 inChapter 2 and Chapter 4, and the descriptions of the restore and save commandsin Chapter 5.

    For more information about objects and path names, see VOS Reference

    Manual (R002) and VOS Commands User’s Guide (R089).

  • 8/20/2019 VOS backup and restoring data (r285-03)

    24/114

    Objects 

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

  • 8/20/2019 VOS backup and restoring data (r285-03)

    25/114

      Backing Up Data  2-1

    Chapter 2

    Backing Up Data2-

    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 thisis 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. Theaccess control lists govern which individuals or groups may use or modify files ordirectories 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 explicitlymounting 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 forexplicitly 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 thetape command is finished.

    If you need to perform only one tape operation, invoking the save command implicitlysaves time. However, if you need to use multiple tapes, or if you are not sure which

  • 8/20/2019 VOS backup and restoring data (r285-03)

    26/114

    Logical Backup: The save Command 

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

    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. Youcan 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 tapewith 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 usedwith 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

    User’s Guide and Programmer’s 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)

  • 8/20/2019 VOS backup and restoring data (r285-03)

    27/114

    Logical Backup: The save Command

      Backing Up Data  2-3

    3. Type y and press the  key to proceed with the save. The following promptappears.

    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 followingmessage.

    End of save. 

    When an implicit save is finished, the tape rewinds automatically and unloads.

    If you invoke attach_port before you invoke save, thecurrent position on the save tape is the end of the tape

    when the save finishes. If you press  whilesaving a set of objects, the operating system positions thetape to the beginning of the file that save was writing.

    4. Label the tape with information about the save (for example, the volume ID, thedate 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 thearguments relating to objects are called the objects arguments .

    You can also specify the type of information to log about the save. The rest of thissection documents the arguments of the save command.

    Before performing a save, calculate how many reels or cartridges of tape will beneeded to back up the data. The amount of tape depends on many factors, includingthe number of blocks stored on the disk. For information on making this calculation, see

    the VOS Tape Processing User’s Guide and Programmer’s Reference (R052).

    Using the Time Factor Arguments in Regular BackupsThis section describes how to use the time factor arguments in regular backups. Whenyou 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 filehas 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:

  • 8/20/2019 VOS backup and restoring data (r285-03)

    28/114

    Logical Backup: The save Command 

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

    • 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 factorargument, 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 objectsarguments 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. Thisargument 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 aprivileged user to use the -backup argument. A

    nonprivileged process must have either read or write

  • 8/20/2019 VOS backup and restoring data (r285-03)

    29/114

    Logical Backup: The save Command

      Backing Up Data  2-5

    access to files and status or modify access to directoriesto save them, but a privileged process can give the

    -backup argument to override these accessrequirements. See the section ‘‘Restricting Operators to

    Backup and Restore” in Chapter 3 for more informationabout 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 whichobjects 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 repeatedpasses through such files to accomplish the save. For more information, see theoperating 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 objectsaved, issue the following commands. The -compression and -unattended 

    arguments can now be used with the mount_tape command. See the VOSCommands 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 as specified in the following.

      Access Rights: readonly (ring_out).

      Tape Format: ansi.

      Volume ID: V1.

      Owner ID: Maureen_Jones.Development

    Okay to mount tape volume? (yes, alter_parameters,

    create_volume, abort)

    Type y and press the  key. Then issue the save command to begin the saveof 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 mountthe tape explicitly. The save command prompts you to load a new tape as it reaches

  • 8/20/2019 VOS backup and restoring data (r285-03)

    30/114

    Logical Backup: The save Command 

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

    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 areassigned 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 lastbackup are saved.

    To save all the objects on d01 modified since the last save, and update thedate-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 modifiedon 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, savingeverything 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 thatweek. 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.

  • 8/20/2019 VOS backup and restoring data (r285-03)

    31/114

    Logical Backup: The save Command

      Backing Up Data  2-7

    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 dateare saved. This save is a supportive save because, without taking the time and spaceto 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 thedate-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 completelyrestrict 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 isthe 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. Ifyou do not give -backup, the date-time-saved values forsaved objects are not updated.

    To save all the objects on d01 modified during the incremental save, and update thedate-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 oneargument that indicates which objects not to save.

    You can specify objects to be saved in the following ways.

  • 8/20/2019 VOS backup and restoring data (r285-03)

    32/114

    Logical Backup: The save Command 

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

    • 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. Starnames are not allowed in control files.

    • Give the -all_disks argument. This argument saves all objects on all disks in asystem. 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 theport 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 fourmethods. 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 betime 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 ofsaves by half, if you are using at least two disk drives and two tape drives. This iscalled a parallel save .

    • Save the disks in sets, with each set of disks grouped to fit on one tape or a set oftapes. You waste little tape space, and you have a manageable set of tapes forrestoring each disk from its top directory.

    To save all the objects on all disks in the system, issue the following command.

  • 8/20/2019 VOS backup and restoring data (r285-03)

    33/114

    Logical Backup: The save Command

      Backing Up Data  2-9

    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 theport 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 followingcommand.

    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 wayis 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. Inmost cases, you supply one or more star names. If you do not want to save temporaryfiles, 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 theport and mounting the tapes for multivolume saves.

    The Log Arguments

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

  • 8/20/2019 VOS backup and restoring data (r285-03)

    34/114

    Logical Backup: The save Command 

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

    • 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 deletinglog files from tape when they become unnecessary.

    If your system does not have enough storage to save the logs online, print at least onecopy 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 restorea file or directory, you can use the information in the log to locate the most current tapeon 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 thefollowing command.

    save %s1#tape.1.0 #d01 -date 95-4-16_18:00:00 -backup

    -volume_ids V1 -log bu_log

    Tape Log FilesThe 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 thefollowing 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 beforeattempting 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 promptsyou. Be sure that each tape is created with ANSI standard labels, has a name that is

  • 8/20/2019 VOS backup and restoring data (r285-03)

    35/114

    Logical Backup: The save Command

      Backing Up Data  2-11

    no more than six characters long, and has a write ring inserted. For information aboutloading tapes, see the chapter on tape processing in the VOS Commands User’s

    Guide (R089), or VOS Tape Processing User’s Guide and Programmer’sReference (R052).

  • 8/20/2019 VOS backup and restoring data (r285-03)

    36/114

    Logical Backup: The save Command 

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

    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 whichit 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 morethan 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 toinform 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 theport and mounting the tapes for multivolume saves.

    When saving to a multivolume set of tapes, the save command writes the volume IDof 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, bothof which are described in VOS Commands Reference Manual (R098). This provides

    some assurance that only those tapes designated as backup tapes are used forbackup.

    The operating system considers all the data it writes on a tape volume to be a tape file .

  • 8/20/2019 VOS backup and restoring data (r285-03)

    37/114

    Logical Backup: The save Command

      Backing Up Data  2-13

    The save command saves variable-length logical records. Performing a save to tapestores them in the VBS  (variable blocked spanned) tape format, in which

    variable-length logical records are mapped into fixed-size physical tape records. Asingle logical record can span one or more tape records. See the VOS Tape

    Processing User’s Guide and Programmer’s Reference (R052) for more information ontape 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, youcan 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 necessarilyknow whether the problem is caused by a bad tape reel or

    a bad tape drive. You should first attempt to restart thesave using a new tape reel. If this does not resolve theproblem, 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 islocated 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 anintermediate point.

  • 8/20/2019 VOS backup and restoring data (r285-03)

    38/114

    Logical Backup: The save Command 

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

    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 anew 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 commandthen 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 thefollowing 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 theremaining objects, you must restart the save from thebeginning.

    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 wasinterrupted. 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.

  • 8/20/2019 VOS backup and restoring data (r285-03)

    39/114

    Logical Backup: The save Command

      Backing Up Data  2-15

    After the tape reel is mounted, the save command continues saving objectsbeginning 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 anyintervention.

    You can load one or two 10-tape cartridge magazines in the drive. The basic steps inthis procedure follow. For a complete description of how to perform a save using theT401/T402 tape drive, see T401/T402 Tape Drive User’s Guide (R315).

    The T402 tape drive supports data compression. The

    compressibility of data may vary widely. If you are usinga T402 tape drive, each cartridge will typically contain twoto three times the equivalent of uncompressed data.

    However, some data patterns may compress slightly ornot 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 besaved. There are about 240 disk blocks in a megabyte. Each T401 cartridge holdsabout 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 cartridgealso 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 thecartridges 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 thevolumes have been created, a READY U prompt appears on the tape drive’s displaypanel. 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 V3V4 -backup -unattended. The operating system displays information on themonitor terminal about the save while the save command is in progress.

  • 8/20/2019 VOS backup and restoring data (r285-03)

    40/114

    Physical Backup: The dump_disk Command 

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

    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 tapeof all allocated blocks (blocks that are in use) on a logical disk. This is referred to asdumping . 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 selectiverestoration of files or directories.

    The dump_disk command makes multiple passes over the disk contents to get aconsistent 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 previouspass. 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 thedisk can be dumped more quickly than it can be modified.

    The dump_disk command does not update the date-time-saved values of objects onthe 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 areanetwork.

    • 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, whenthe operating system completes the first pass over the disk, it pauses and displays amessage 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 theoperating system to get a consistent copy of every disk block while suspending disk

    activity only for a very short time.

  • 8/20/2019 VOS backup and restoring data (r285-03)

    41/114

    Physical Backup: The dump_disk Command

      Backing Up Data  2-17

    Dumping the Master Disk

    When executed on a master disk, the dump_disk command puts a copy of theoperating 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 sucha 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) forinformation 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 SystemAdministration: 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 disk’s label. See VOS SystemAdministration: Starting Up and Shutting Down a Moduleor System (R282) for information about performing a tape

    boot.

  • 8/20/2019 VOS backup and restoring data (r285-03)

    42/114

    Physical Backup: The dump_disk Command 

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

    Dumping All the Disks in a Module

    On a module running with nonduplex disks, you should perform frequent physicalbackups 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 areunnecessary. On modules with less stable applications, include physical backup of all

    disks as part of the backup schedule, even though you also perform regular logicalbackups. See Chapter 3 for information about planning a backup schedule.

    To perform a physical backup of the disks d01, d02, and d03, issue the followingcommands.

    dump_disk %s1#tape.1.0 d01 -pause

    dump_disk %s1#tape.1.0 d02 -pause

    dump_disk %s1#tape.1.0 d03 -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 inthis 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 User’sGuide (R315).

    The T402 tape drive supports data compression. Thecompressibility of data may vary widely. If you are using

    a T402 tape drive, each cartridge will typically contain twoto three times the equivalent of uncompressed data.

    However, some data patterns may compress slightly ornot 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 ontape storage. Since the block size for thedump_disk command cannot be altered,

    each cartridge can hold only 120 megabytes. Although a T402 cartridge also willhold 120 megabytes of data, it can be equal to 240 to 360 megabytes ofuncompressed  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

  • 8/20/2019 VOS backup and restoring data (r285-03)

    43/114

    Using Command Macros for Backup

      Backing Up Data  2-19

    the VOS Commands Reference Manual (R098). Issue the following command tostart an unattended dump_disk command: dump_disk

    tape_device_or_port_name -unattended. The operating system displaysinformation 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 theset_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 ofthe 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 User’s Guide (R089) for information about creating commandmacros.

  • 8/20/2019 VOS backup and restoring data (r285-03)

    44/114

    Using Command Macros for Backup 

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

  • 8/20/2019 VOS backup and restoring data (r285-03)

    45/114

      Backup Operations  3-1

    Chapter 3

    Backup Operations3-

    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 amodule 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 thatmodule. 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 theDisks 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 typeof 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 performingbackups.

    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 areessential. Conserving system resources is important, but it is less important than the

    ability to restore individual objects when they are accidentally damaged or deleted. Thisschedule calls for:

  • 8/20/2019 VOS backup and restoring data (r285-03)

    46/114

    Planning a Backup Schedule 

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

    • 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 thebeginning 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. Thiscommand 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 twomonths 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 conservessystem resources by combining logical and physical backups, but it takes the risk thatan 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 twoweeks. The -compression and -unattended arguments can now be used with

    the save command. See the VOS Commands Reference Manual (R098). Thecommand 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 eachdisk.

  • 8/20/2019 VOS backup and restoring data (r285-03)

    47/114

    Restricting Operators to Backup and Restore

      Backup Operations  3-3

    Restricting Operators to Backup and Restore

    Both the save command and the restore command (documented in Chapter 5 of thismanual) 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 auser 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 theregistration database and, for each of the user’s privileged registrations, to edit theuser’s start_up.cm file.

    1. For the user’s first user name, give the registration_admin command andselect 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 twoscreen 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 user’s other user names, select the Add New User optionfrom the registration_admin command’s menu. But for each of these usernames, set both the Privileged and the Must Have Start Up Program fieldsto yes.

    3. Tailor the start_up.cm file for each of the user’s privileged user names so that

    he or she is restricted to backup or restore while logged in as privileged. Forexample, the startup file could begin executing a save or restore command, andthen 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 withspecified 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 diskor 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 havethe information recommended here, you will have no trouble determining which tapesto use for disk recovery.

  • 8/20/2019 VOS backup and restoring data (r285-03)

    48/114

    Keeping Backup Records 

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

    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 otherpurpose) 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 thisfile for information about the condition of your backup tapes.

  • 8/20/2019 VOS backup and restoring data (r285-03)

    49/114

      Restoring Data from Logical Backups  4-1

    Chapter 4

    Restoring Data from LogicalBackups4-

    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 contentsof 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 andTape Administration (R284) before working with either of the retrieval commands. (The

    restore command operates on logical volumes or portions of a logical volume, andthe 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, thatrestore data to a specified place in the directory hierarchy. The data must have beensaved 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 theentire 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 severalarguments that control various aspects of the restoration process. This sectiondiscusses 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 VOSCommands 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 restoringobjects 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 beattached 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.)

  • 8/20/2019 VOS backup and restoring data (r285-03)

    50/114

    Retrieving Backed-Up Data: The restore Command 

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

    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 anddetaching the port.

    If you give a device name, and a port is already attached,

    that port is used. Since this is not an implicit portattachment, you need to explicitly detach the port after thetape 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 orwhen 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 thefollowing steps.

    1. Load the tape on a tape drive connected to %s1#m1. See VOS Tape Processing

    User’s Guide and Programmer’s 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. Seethe 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 thefollowing message.

    End of restore, last saved object: 95-04-06 6:45:43 EDT 

  • 8/20/2019 VOS backup and restoring data (r285-03)

    51/114

    Retrieving Backed-Up Data: The restore Command

      Restoring Data from Logical Backups  4-3

    4. Unload the tape.

    These are the basic steps in a restore. The restore command can attach the port andmount the tape without user intervention. The restore command arguments let youselect 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 multitapebackup, 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 byinvoking attach_port and mount_tape explicitly.

    If restore encounters an unreadable portion of tape while attempting a restore, itskips 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 iscomplete.

    If you cannot restore objects from the most recent savetapes, you can try restoring the objects from older savetapes.

    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 objectsarguments.

    The restore command has additional arguments that further define which objects to

    restore. These arguments, which modify the objects arguments, are discussed later inthis 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 thecommon 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 givea 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 asummary of the objects arguments and the modifying arguments.

  • 8/20/2019 VOS backup and restoring data (r285-03)

    52/114

    Retrieving Backed-Up Data: The restore Command 

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

    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 thedirectory 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 ACLsof 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 followingcommand.

    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 thefollowing 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 therestore command normally determines which objects to restore. In this way, thesearguments modify the objects arguments.

    Table 4-1 shows the circumstances, the default responses, and how these modifying

    arguments change the default responses.

  • 8/20/2019 VOS backup and restoring data (r285-03)

    53/114

    Retrieving Backed-Up Data: The restore Command

      Restoring Data from Logical Backups  4-5

    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 onthe tape. To replace the version of >Jones>programs that is on the disk by theversion 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 theearliest 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 isuseful 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 expirationdate, if set, on any object to be replaced or deleted. This functionality is necessarywhen restoring an incremental save.

    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 afile 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 dothis, 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 toits state at the time of the last

    backup.

  • 8/20/2019 VOS backup and restoring data (r285-03)

    54/114

    Retrieving Backed-Up Data: The restore Command 

    4-6 VOS System Administration: Backing Up