The ftp utility – HP NonStop G-Series User Manual

Page 153

Advertising
background image

Restoring Files From a Tape to the Guardian Environment

To restore files from the tape mounted on $TAPE to the Guardian target $VOL.SUBVOL, extracting
only the .c files and overwriting any existing Guardian files with the same name, enter the following:

$ cd /G/vol/subvol

$ PAX -rv -f /G/tape -W clobber *.c

The -r flag reads an archive file from the standard input file.

The -v flag in list mode produces a verbose table of contents. Otherwise, it writes archive member
pathnames to the standard error file.

The -f /G/tape flag specifies the pathname of the input or output archive, overriding the default
standard input file (in list or read modes) or standard output file (in write mode). Guardian tape
devices can be specified with the /G naming convention. Guardian system procedure calls are
used to interface with the Guardian tape process. If the -a flag is also specified and disk archive
medium is used, files are appended to the end of the archive.

The -W clobber flag is a HP extension. This flag allows the matching files from an archive to be
stored to a Guardian target and to overwrite any preexisting Guardian target files with the same
name. Users must be aware that the files are restored as unstructured files and that Guardian file
attributes are not preserved.

NOTE:

Users must have a good understanding of the potential dangers for data to be overwritten

(as described in the pax(1) reference page) before using the -W clobber flag to restore files
to a Guardian target.

When restoring files in an archive, you can skip files archived from the /E or /G directories by
including the -W NOE and -W NOG flags, respectively, on the pax command. For example, the
following command extracts and restores all OSS files in an archive named paxfile but skips
files archived from /G:

pax -rvf paxfile -W NOG

The ftp Utility

The ftp utility is the interface to the file transfer protocol (FTP) and is used to transfer files between
the local host and a remote host or between two remote hosts.

FTP is designed to allow transferring data between hosts that use dissimilar file systems. Therefore,
although the protocol provides a lot of flexibility for transferring data, it does not attempt to preserve
file attributes that are specific to a particular file system (for example, the protection mode or
modification times of a file). Additionally, ftp makes few assumptions about the overall structure
of a file system and does not provide for or allow such things as recursively copying subdirectories.

The ftp command provides subcommands for tasks such as listing remote directories, changing
the current local and remote directory, transferring multiple files in a single request, creating and
removing directories, and escaping to the local shell to perform shell commands.

If you execute ftp and do not specify a host name, ftp immediately displays the ftp> prompt
and waits for an ftp subcommand. To connect to a remote host, execute the open subcommand.
When the ftp command connects to the remote host, ftp then prompts for the user name and
password before displaying the ftp> prompt again. ftp fails if no password is defined at the
remote host for the specified user name.

If you do specify the name of a remote host, ftp immediately tries to establish a connection to the
specified host. If ftp connects successfully, ftp searches for a local $HOME/.netrc file in your
current directory or home directory. If the file exists, ftp searches the file for an entry that initiates
the login process and command macro definitions for the remote host. If the $HOME/.netrc file
or autologin entry does not exist, ftp prompts you for a user name and password. This occurs
whether or not the host name is entered on the command line.

The ftp Utility

153

Advertising
This manual is related to the following products: