Open System Services Management and Operations Guide (G06.25+, H06.03+)
Managing OSS Files
Open System Services Management and Operations Guide—527191-002
6-19
Backing Up User Files
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. See
the Backup and Restore 2.0 Manual for more information about restoring OSS 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.