13 transferring and archiving files, Filename and directory name transformations, The pax utility – HP NonStop G-Series User Manual

Page 151: Chapter 13: transferring and archiving files

Advertising
background image

13 Transferring and Archiving Files

There are several utilities for copying, moving, and transferring files between the OSS and Guardian
environments.

For simply copying and moving files and directories between the Guardian and OSS environments,
the OSS cp (copy) and mv (move) commands may be easiest.

NOTE:

The mv command fails with error "Guardian or User Defined Error 197" if a remote user

attempts to move an SQL object that is in the OSS file system and the file is present in the destination
directory. To move this type of file, a local user must execute the mv command.

For copying OSS directories and files onto a tape, use the pax command. Also use the pax
command for restoring files and directories from tape to the OSS environment.

Finally, the pax command can be used as an alternative to the cp command for reading and
writing files and directories between the Guardian and OSS environments.

CAUTION:

Syntax differences between the Guardian and OSS environments can cause filenames

to change when files are copied between environments.

Filename and Directory Name Transformations

Due to syntax differences between Guardian filenames and OSS filenames, the following behaviors
can occur when files are transferred between Guardian and OSS environments.

A Guardian filename that is generated in the OSS environment may contain invalid Guardian
filename characters. As a result, the archive member cannot be created on the Guardian target
and the transfer will fail.

In the name-conversion process, OSS names that are longer than eight characters are truncated
to the first valid eight characters. For example, an OSS filename like abcdefghi is converted to
the Guardian name ABCDEFGH. This can cause confusion and make identification of files difficult.
Filenames that are similar may be converted to the same filename, resulting in one file overwriting
another.

The pax Utility

The pax utility extracts, writes, and lists members of archive files. It also copies files and directory
hierarchies.

The name of the archive file can be specified with the -f flag. The archive file can be a disk file
or tape file that is connected to a tape drive. If the -f flag is not specified, in read mode the archive
file is assumed to be the standard input file and in write mode the archive file is assumed to be
the standard output file. If the standard input comes from a file, the file should be a text file with
one pathname on each line and no leading or trailing blanks.

Unless otherwise noted, pax makes no distinction between Guardian and OSS files.

In the OSS environment, Guardian files are specified with the /G pathname convention. On output,
the Guardian files are copied in the same manner they would be with the cp utility: the Guardian
file attributes are not preserved. On input, files can be restored to the Guardian target, but the
existing Guardian files are overwritten only if the -W clobber flag is specified. The file will be
restored as an unstructured Guardian file. Only Guardian files that are supported by the OSS
environment are processed.

If the OSS environment fails to operate on /G files, pax returns a diagnostic message and, if
possible, continues to process the other files.

The pax utility uses Guardian tape devices to read and write tape archives. Guardian tape devices
are controlled by the Guardian tape process executing in the Guardian environment and do not

Filename and Directory Name Transformations

151

Advertising
This manual is related to the following products: