Open System Services Management and Operations Guide (G06.29+, H06.07+)
Managing OSS Files
Open System Services Management and Operations Guide—527191-005
6-16
Backing Up User Files
entire file-system backup. You could write a shell script to do this. For information
about shell scripts, see the Open System Services User’s Guide.
You can use the find command to produce a list of files that must be backed up and
then pipe this list to the backup command pax. For example, to back up all user files
that were modified in the past week onto the tape using the tape device $TAPE, use a
command such as:
find /user/* -mtime -7 | pax -w -f /G/TAPE
where /user contains all working directories.
If you attempt to archive individual files, you must compensate for the fact that the pax
utility cannot append a file to an unlabeled tape. Each successive write to such a tape
begins at the beginning of the tape.
For example, if you issue the following commands from the shell:
find xlog -print | pax -wv -f /G/TAPE -W norewind
find xlog.bsm -print | pax -wv -f /G/TAPE -W norewind
then physically unload the tape, reload the tape, and enter:
pax -rv -f /G/TAPE -W norewind
then the tape contains only the last file archived by the two command lines entered. To
archive more than one file on an unlabeled tape, you must enter all the commands
within the same subshell. For example:
( find xlog -print; find xlog.bsm -print ) | pax -wv -f /G/tape
This command causes all the files printed by both find commands to be written to
tape, because the find commands are executed in a single subshell.
For more information about the pax and find commands, see the pax(1) reference
page and the find(1) reference page, either online or in the Open System Services
Shell and Utilities Reference Manual. Additional information about both commands is in
the Open System Services User’s Guide.
Note. Do not begin find or pax operations at the root (/) directory. find and pax perform
recursive operations within directories unless you use the UTILSGE=NOG:NOE environment
variable or the -W NOG and -W NOE flags. The / directory contains /G and /E. If you begin an
operation that recursively processes directories at /, you can unintentionally process an entire
Guardian file system and the operation will take a very long time to finish.
See Using the Local Root Directory as a Pathname
on page 3-5 for more information about
UTILSGE, -W NOG, and -W NOE.