To restore the directory backed up in the previous example to
/u/project_old,
enter the following commands:
tso "oput 'PROJECT.ARCHIVE' '/tmp/project.pax.Z binary"
cd /u/project_old
pax -pe -rvf /tmp/project.pax.Z
Note: - The pax command can read an archive
directly from an MVS™ data set;
you can skip the OPUT command by specifying the MVS data set on the pax command:
pax -pe -rvf "//'PROJECT.ARCHIVE'"
- The equivalent tar command is:
tar -p -xvf /tmp/project.pax.Z
To
read directly from MVS (OS/390® Release 8 or later): tar -p -xvf "//'PROJECT.ARCHIVE'"
- The -pe option for pax and
the -p option for tar are
used to restore the original owner, group, modes, and extended attributes.
If you do not have the appropriate privileges to restore these, warning
messages are generated. These options are not required to restore
the component files and can be omitted. For tar,
the -o option is also used to disable restoring
the owner and group.
- pax and tar automatically
detect the archive format and whether the archive is compressed, so
the -z option for pax and,
for tar, the -U option
is not required. If these options are used, pax/tar fails
if the archive is not compressed or not in USTAR format.
- The -v (verbose) option is used to display
the names of files as they are being restored, and is not required.
- Component files can be renamed during extraction by pax using
the -i or -s option.