Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dump(1M)

dump2(1M)

mkfs(1M)

mount(1M)

hosts.equiv(4)

appropriate_privilege(5)

cap_defaults(5)



restore(1M)                    DG/UX R4.11MU05                   restore(1M)


NAME
       restore - incrementally restore a file system

SYNOPSIS
       /usr/sbin/restore key [ filename ... ]

   where:
       key       A character string composed of one function keyletter and
                 zero or more optional keyletters
       filename  The name of a data file or directory specifying the files
                 that are to be restored

DESCRIPTION
       Restore reads files and symbolic links dumped with the dump(1M) or
       dump2(1M) commands.  Its actions are controlled by a key argument.
       Unless the h key is specified (see below), the appearance of a
       directory name refers to the files and (recursively) subdirectories
       of that directory.

       The function keyletters are:


       Z    (Pertains to a system with DG/UX information security.)  Restore
            a standard dump format archive dumped on a standard system.  By
            default, restore expects a secure DG/UX® format dump archive as
            dumped by secure dump2 and restores the security attributes of
            each file.


       r    Read the tape and load its contents into the current directory.
            This keyletter should be used only to restore a complete dump
            tape onto a clear file system or to restore an incremental dump
            tape after a full level zero restore.  Following is a typical
            sequence to restore a complete dump:
                 /usr/sbin/mkfs /dev/dsk/mnt
                 /sbin/mount /dev/dsk/mnt /mnt
                 cd /mnt
                 restore r

            You can invoke restore again to get an incremental dump in on
            top of this.  Note that restore leaves a file restoresymtable in
            the current directory to pass information between incremental
            passes by restore.  This file should be removed when the last
            incremental tape has been restored.

       R    Request a particular tape of a multi-volume set on which to
            restart a full restoration (see the r key above).  This lets you
            interrupt restore, then restart it.

       x    Extract the named files from the tape.  If the named file
            matches a directory whose contents had been written onto the
            tape and the h key is not specified, the directory is
            recursively extracted.  The owner, modification time, and mode
            are restored if possible.  If no filename argument is given,
            then the root directory is extracted, which results in the
            entire content of the tape being extracted, unless the h key has
            been specified.

       t    List the names of the specified files if they occur on the tape.
            If no file argument is given, then the root directory is listed,
            which results in the entire content of the tape being listed,
            unless the h key has been specified.  The t key replaces the
            function of the old dumpdir program.

       V    Verify only.  This is basically a sanity-check of the backup
            image.  The entire backup image is read and headers and
            checksums are checked for consistency.  Any anomalies found in
            the backup image are reported to stderr.  No file system
            information is restored to disk.

       i    Interactively restore files from a dump tape.  After reading in
            the directory information from the tape, restore provides a
            shell-like interface that lets you move around the directory
            tree selecting files to be extracted.

            Commands are given below.  When dir or file is an argument, the
            default is the current directory.

            ls [dir] - List the dir directory.  Entries that are directories
                 are appended with a slash (/).  Entries that have been
                 marked for extraction are prepended with an asterisk (*).
                 If the verbose key is set, each entry's inode number is
                 also listed.

            cd dir - Change the current working directory to dir.

            pwd - Print the full pathname of the current working directory.

            add [file] - Add directory or data file file to the list of
                 files to be extracted.  If a directory is specified, it and
                 all its descendents are added to the extraction list
                 (unless the h key was specified on the command line).
                 Files that are on the extraction list are prepended with an
                 asterisk when they are listed by ls.

            delete [file] - The current directory or specified argument is
                 deleted from the list of files to be extracted.  If a
                 directory is specified, then it and all its descendents are
                 deleted from the extraction list (unless the h key was
                 specified on the command line).  The most expedient way to
                 extract most of the files from a directory is to add the
                 directory to the extraction list and then delete those
                 files that are not needed.

            extract - Extract from the dump tape all the files on the
                 extraction list.  Restore asks you which volume you wish to
                 mount.  The fastest way to extract a few files is to start
                 with the last volume and work toward the first volume.  To
                 extract files, you need to use "add file" to add the file
                 to the list that extract will use.

            setmodes - All the directories that have been added to the
                 extraction list have their owner, modes, and times set;
                 nothing is extracted from the tape.  This is useful for
                 cleaning up after a restore has been prematurely aborted.

            verbose - Toggle verbose mode (see the v key).  In verbose mode,
                 the ls command lists the inode numbers of all entries, and
                 restore prints out information about each file as it is
                 extracted.

            help - List a summary of the available commands.

            quit - Exit immediately, even if the extraction list is not
                 empty.

            x - Exit immediately, even if the extraction list is not empty.

       The optional keyletters are:

       b    Use blocking factor factor, which is the number of 1024-byte
            blocks to use per tape record.  It must match the blocking
            factor used to dump the tape.  Ideally, this will be the optimal
            blocking factor for the device you're using.  If this keyletter
            is not used, restore tries to determine the tape block size
            dynamically.  See dump(1M) and dump2(1M).

       v    Enter verbose mode.  Normally restore does its work silently.
            In verbose mode, restore reports the file type and name of each
            file on which it acts.

       f    Use the next argument to restore as the name of the archive
            instead of /dev/rmt/0.  If the next argument is `-', restore
            reads from standard input.  Thus, dump or dump2 and restore can
            be used in a pipeline to dump and restore a file system with the
            command

                dump 0f - /usr | (cd /mnt; restore xf -)

            If you have DG TCP/IP (DG/UX), you can restore from a remote
            device.  For example,

                restore rf sys:/dev/rmt/0

            lets you restore the contents from the tape device "0" on the
            system "sys" into the current directory.  To do this, you must
            be logged in as root on your own system, and your system must
            have an entry in the remote host's /.rhosts file.

       y    Do not not ask whether the restoration should abort, if a tape
            error occurs.  Restore skips over the bad tape block(s) and
            continues.

       m    Extract by inode numbers rather than by filename.  This is
            useful if only a few files are being extracted and you want to
            avoid regenerating the complete pathname to the file.

       h    Extract the actual directory rather than the files that it
            contains.  This prevents hierarchical restoration of complete
            subtrees from the tape.

       s    The next argument to restore is a number which selects the file
            on a multi-file dump tape.  File numbering starts at 1.

       Restore, dump(1M), and dump2(1M) support symbolic links and control
       point directories.

FILES
       /dev/rmt/0          Default tape drive for restoration tapes
       /tmp/rstdir*        File containing directories on the tape
       /tmp/rstmode*       File containing owner, mode, and time stamps for
                           directories being restored
       ./restoresymtable   File containing information passed between
                           incremental restorations

DIAGNOSTICS
       A bad key character produces an error message.

       A read error produces a message.  If y has been specified or you
       respond `y', restore attempts to continue restoration.

       When a dump image is from stdin and the blocking factor for restore
       is greater than the blocking factor of the dump image, the message
       "partial block read" may be displayed at the end of the restore.
       This message may also appear when restore reaches the end of the dump
       image on a QIC tape drive.  This message appears because restore
       defaults to a 32K blocking factor when reading from stdin or from QIC
       tapes--even if the dump was made using another blocking factor.  In
       both of these cases, the message is innocuous and you can answer "y"
       or "n" to the question, "is this the end of the dump?"  To completely
       avoid this extraneous message, use the b option to explicitly specify
       the blocking factor for the dump.  The default blocking factor for
       dumps created with dump2(1M) is 16; for dump(1M), it is 10.

       If the dump extends over more than one tape, restore asks you to
       change tapes.  If the x or i key has been specified, restore also
       asks which volume you wish to mount.

       Restore performs numerous consistency checks that can produce
       diagnostic messages.  Most messages are self-explanatory or rarely
       occur.  Common error messages are:

       Converting to new file system format
            A dump tape created from the old file system has been loaded.
            It is automatically converted to the new file system format.

       filename: not found on tape
            The specified filename was listed in the tape directory but was
            not found on the tape.  This error is caused by tape read errors
            while looking for the file and from using a dump tape created on
            an active file system.

       expected next file inumber, got inumber
            A file that was not listed in the directory showed up.  This
            error can occur when using a dump tape created on an active file
            system.

       Incremental tape too low
            When doing incremental restore, a tape that was written before
            the previous incremental tape, or that has too low an
            incremental level has been loaded.

       Incremental tape too high
            When doing incremental restore, a tape that does not begin its
            coverage where the previous incremental tape left off, or that
            has too high an incremental level has been loaded.

       Tape read error while restoring filename
       Tape read error while skipping over inode inumber
       Tape read error while trying to resynchronize
            A tape read error has occurred.  If a filename is specified,
            then its contents are probably partially wrong.  If an inode is
            being skipped or the tape is trying to resynchronize, then no
            extracted files have been corrupted, though files may not be
            found on the tape.

       resync restore, skipped num blocks
            After a tape read error, restore may have to resynchronize
            itself.  This message lists the number of blocks that were
            skipped over.

       invalid blocking factor, num
            See explanation for b option.

       invalid memory buffer specified, num
            See explanation for g option.

SEE ALSO
       dump(1M), dump2(1M), mkfs(1M), mount(1M), hosts.equiv(4),
       appropriate_privilege(5).
       cap_defaults(5).

NOTES
       Restore may give incorrect results when doing incremental restores
       from dump tapes that were made on active file systems.

       A level zero dump must be done after a full restore.  Because restore
       runs in user code, it has no control over inode allocation; thus a
       full dump must be done to get a new set of directories reflecting the
       new inode numbering, even though the contents of the files are
       unchanged.

       Restore complains about socket files (file mode 0140000); it should
       ignore these files.

       When restoring an archive from a medium which is part of a multiple-
       archive, multiple-medium backup set, restore assumes that the first
       volume is the medium on which this archive begins, regardless of the
       medium's position in the set.  If the archive spans more than one
       medium, restore's second volume refers to the next medium in the set,
       and so on.

       Attempting to restore the /usr file system produces an error when the
       /usr/sbin/restore command attempts to overwrite itself while it is
       being executed.  To solve the problem, copy /usr/sbin/restore to
       /tmp, then invoke /tmp/restore to restore the /usr file system.
       Alternatively, you may invoke restore interactively and select all
       files in /usr except /usr/sbin/restore for restoration.  This latter
       method must be used if you are restoring using sysadm.

       On a system with DG/UX information security, restore now explicitly
       requires appropriate privilege.  If you attempt invoke restore
       without appropriate privilege, restore exits (status equals 1)
       writing the following message to standard error:

            restore now requires appropriate privilege
            See your system administrator about restoring files with restore


       You must have appropriate privilege to use restore.  For systems
       supporting the DG/UX Capability Option, appropriate privilege is
       defined as having one or more specific capabilities enabled in the
       effective capability set of the user.  See cap_defaults(5) for the
       default capabilities for this command.

       On systems without the DG/UX Capability Option, appropriate privilege
       means that your process has an effective UID of root.  See the
       appropriate_privilege(5) man page for more information.


Licensed material--property of copyright holder(s)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026