Open System Services Management and Operations Guide (G06.30+, H06.08+, J06.03+)
new-pathname
is the relative OSS pathname of the directory to contain the copied files; this specification
overrides use of the standard output file.
In the example, this directory is named newdir and is the one previously created by the mkdir
command within the current working directory.
Restoring OSS Files Using Backup and Restore 2.0
You can specify part or all of multiple directory hierarchies and selectively restore files from within
them using Backup and Restore 2.0. For example, if you enter the following at a Backup and
Restore 2.0 BR> prompt:
RESTORE =MYTAPE, OSS ((/user/bin TGT /newdir, /usr/local/bin,
( /home/sv/myfile, TGT /home/sv ), /etc/rc, /var/x ), TAPEDISPOSITION NOREWIND, VERIFYTAPE ON;
you start a restore process that reads selected OSS files from the tape identified by the DEFINE
=MYTAPE and restores them to the OSS file system as follows:
• All files from /user/bin are restored to the existing directory /newdir.
• All files from /usr/local/bin are restored to their original parent directory (which is
/usr/local/bin).
• All files from /home/sv/myfile are restored to the directory /home/sv, which effectively
moves them up a level in the directory tree.
• All files from /etc/rc and /var/x are restored to their original parent directories.
You must create the TGT directories before entering the command if they do not already exist. You
can also restore entire filesets using the fileset mount points. For more information about restoring
OSS files, see the Backup and Restore 2.0 Manual.
NOTE: You cannot restore an OSS file that is larger than approximately 2 gigabytes to a system
running an RVU that does not include support for OSS large files.
Restoring OSS Files From a pax Archive
The following command restores the content of a pax archive to the current directory:
pax -r -s replstr -f archive-name
-r
reads an archive file from the standard input file.
-s replstr
modifies the file or archive member names named by pattern or file operands according
to the substitution expression replstr, using the syntax of the ed utility. For information about
the ed utility, see the ed(1) reference page either online or in the Open System Services Shell
and Utilities Reference Manual. (The ed utility concepts of “address” and “line” are meaningless
in the context of the pax utility and must not be used.)
The format of replstr is:
/old/new/[gp]
where (as in the ed command) old is a basic regular expression, new is the replacement
string to be inserted in place of matches for the regular expression, and the g and p options
specify forms of replacement.
-f archive-name
specifies the relative OSS pathname of the archive file to be read.
For example, to read the archive a.pax, with all files rooted in /usr within the archive and
extracted relative to the current directory, enter the OSS shell command:
pax -r -s ',^//*usr//*,,' -f a.pax
In this example, the expression:
Backing Up and Restoring OSS Files 189