|
» |
|
|
|
NAMEftio — faster tape I/O SYNOPSISftio -o|-O
[achpvxAELM]
[-B
blksize]
[-D
type]
[-e
extarg]
[-K
comment]
[-L
filelist]
[-N
datefile]
[-S
script]
[-T
tty]
[-Z
nobufs]
tapedev
[pathnames]
[-F
ignorenames] ftio -i|-I
[cdfmptuvxAEMPR]
[-B
blksize]
[-S
script]
[-T
tty]
[-Z
nobufs]
tapedev
[patterns] ftio -g
[v]
tapedev
[patterns] RemarksNote:
The
fbackup,
frecover,
and
ftio
commands are deprecated for creating new archives.
See
WARNINGS
for more information. DESCRIPTIONftio
is a tool designed specifically for copying files to tape drives.
It performs faster than either
cpio
or
tar
in comparable situations (see
cpio(1)
and
tar(1)).
ftio
uses multiple processes (to read/write the file system
and to write/read the tape device),
with large amounts of memory sharing between processes
as well as a large block size for reading and writing to the tape. ftio
is compatible with
cpio
in that output from
cpio
is always readable by
ftio,
and output from
ftio
is readable by
cpio,
except as explained in the
"cpio Compatibility" section, later in the manpage. ftio
must be invoked with exactly one of the following options:
-o,
-O,
-i,
-I,
or
-g.
The
-o
and
-O
options specify that
ftio
is writing "out" from file system to tape;
the
-i
and
-I
options specify that
ftio
is writing "in" from tape to file system.
The
-o,
-O,
-i,
and
-I
options can be followed by modifiers
that must appear immediately after the option
with no spaces between the option and the modifier, as in
ftio -idxE
(see Modifiers section below). tapedev
specifies the name of a device special file for the tape device
to which the output is written.
A device on a remote machine can be specified in the form
machine:device_special_file ftio
creates a server process from
/usr/sbin/rmt
on the remote machine to access the tape device.
If
/usr/sbin/rmt
does not exist on the remote system,
ftio
creates a server process from
/etc/rmt,
on the remote machine to access the tape device. Optionsftio
recognizes the following options:
- -o
Copy (out) files from the file system to
tapedev,
including path name and status information.
If
pathnames
are specified,
ftio
recursively descends
pathnames
looking for files, and copies those files to
tapedev.
If
pathnames
are not specified,
ftio
reads the standard input to obtain a list of path names to copy.
ftio
can copy to multiple tapes if required.
For every tape used,
ftio
generates a tape header containing the current tape volume number,
machine node name and type, operating system name,
release and version numbers (all from the
uname()
system call; see
uname(2)),
username of the person issuing the
ftio
command,
the time and date the command was executed,
the number of consecutive times the current media has been used,
a comment field, and other items used internally by
ftio.
The tape header is separated from the main body of the tape archive
by an end-of-file mark.
The tape header can be read by invoking
cat
with the device file name as the first argument (see
cat(1)).
Note, character and block device special files written with the
-o
option are not transportable to other
HP-UX
implementations. - -O
Copy out files in the same way as
ftio -ocva,
when no modifiers are used with the
-O.
However, if the
.ftiorc
file exists in the user's home directory,
ftio
opens this file and scans for lines preceded by
O=.
Options defined on matching lines are passed to
ftio
as if they had been specified on the command line.
See
EXAMPLES
section. - -i
Extract (copy into the file system) files from
tapedev,
which is assumed to be a tape and the product of a previous
ftio -o
operation.
Only files with names that match
patterns,
according to the rules of Pattern Matching Notation (see
regexp(5)),
are selected.
In addition, a leading
!
within a pattern indicates that only those names
that do
not
match the remainder of the pattern
should be selected.
Multiple
patterns
can be specified.
If no
patterns
are specified, the default for
patterns
is
*
(that is, select all files).
The extracted files are conditionally created and copied
into the current directory tree, based upon the options described below.
The permissions of the files are those of the previous
-o
operation. - -I
Extract (copy into the file system) files in the same way as for
ftio -icdmv,
when no modifiers are used with the
-I.
However, if the
.ftiorc
file exists in the user's home directory,
ftio
opens this file, and scans for lines preceded by
I=.
Options defined on matching lines are passed to
ftio
as if they had been specified on the command line.
See
EXAMPLES
section. - -g
Read the file list in
tapedev.
If
patterns
is specified, only file names that match are printed.
Note that file names are always preceded by the volume that
ftio
expected the file to be on when the file list was created; thus
only the last volume is valid in this respect. - -e extarg
Specifies the handling of any extent attributes of the file[s] to be archived.
Extent attributes cannot be preserved when archiving files with
ftio.
extarg
takes one of the following values:
- warn
Issue a warning message and archive the file without extent attributes. - ignore
A file with extent attributes will be archived, without preserving the
extent attributes and without issuing a warning message. - force
A file with extent attributes will not be archived and a
warning message will be issued.
If
-e
is not specified, the default value for
extarg
is
warn. - -B blksize
Specify the size (in bytes) of blocks written to tape.
This number can end with
k,
which specifies multiplication by 1024.
The use of larger blocks generally improves performance
and tape usage.
The maximum allowable block size is limited by the tape drive used.
A default of 16384 bytes is set because this is the maximum block
size on most Hewlett-Packard tape drives. - -D type
Descend a directory recursively, only if the
file system to which it belongs is
type,
where
type
can be
hfs,
vxfs,
or
nfs. - -F ignorenames
Arguments following
-F
specify
patterns
that should not be copied to the tape.
The same rules apply to
ignorenames
as to
patterns;
see the earlier description for
ftio -i. - -K comment
Specify a comment to be placed in the
ftio
tape header. - -L filelist
Create a list of the files being backed up.
filelist
specifies the output file.
If
pathnames
is specified, perform the file search
and generate a list of files
prior to actually commencing the backup.
This list is then appended to the tape header
of each tape in the backup as a list of files that
ftio
attempted to fit onto this tape.
The last tape in the backup contains a catalog
identifying where the files are in the archive set.
If
pathnames
is not also specified, the file list is taken from standard input
before the backup begins.
In addition to generating file lists, the
-L
option implements tape checkpointing,
allowing the backup to restart from a write failure on bad media. - -M
Make fully compatible with
cpio.
That is, do not generate or expect tape headers
and change the default block size to 5120 bytes.
(See the cpio Compatibility section below.) - -N datefile
Only files newer than the file specified in
datefile
are copied to tape. - -R
Resynchronize automatically, when
ftio
goes out of phase.
This is useful when restoring from a multi-tape backup
from tapes other than the first.
By default,
ftio
asks the user if resynchronization is required. - -S script
Specify a command to be invoked every time a tape is completed
in a multi-tape backup.
The command is invoked
with the following arguments:
script tape_no user_name.
script
is the string argument
script
specified with the
-S
option.
tape_no
is the number of the tape required, and
user_name
is the user who invoked
ftio.
Typically, the string
script
specifies a shell script which is used to
notify the user that a tape change is required. - -T tty
Specify alternative to
/dev/tty.
Normally
/dev/tty
is opened by
ftio
when terminal interaction is required. - -Z nobufs
Specify the number of
blksize
chunks of memory to use as buffer space between the two processes,
where
blksize
is the size of blocks written to the tape.
More chunks is usually better,
but a point is reached where no improvement is gained,
and performance might deteriorate
as buffer space is swapped out of main memory.
A default value of 16 is set for
nobufs,
but using 32 or 64 might improve performance if your system is
not heavily loaded.
Best results are obtained when backups are performed
with the system in single-user mode (see
shutdown(1M)).
ModifiersThe following modifiers can be used with certain options
as indicated in the
SYNOPSIS:
- a
After files are copied to tape, reset their access time to
appear as though the files were not accessed by
ftio. - c
Write header information in
ASCII
character form, for portability. - d
When restoring files, create directories as needed. - f
Copy in all files except those that match
patterns. - h
Archive the files to which symbolic links point,
as if they were normal files or directories.
By default,
ftio
archives the link itself. - m
Retain previous file modification time and ownership of file.
Restoring modification time does not apply
to directories that are being restored. - p
At the end of the backup, print the number of blocks transferred,
the total time taken (excluding tape rewind and reel-change time),
and the effective transfer rate calculated from these figures.
These values are printed at the end of each tape if
p
is specified twice. - t
Print only a table of contents of the input.
No files are created, read, or copied. - u
Copy unconditionally (by default,
ftio
does not replace a newer file
with a older file of the same name). - v
Be verbose.
Print a list of file names and tape headers.
When used with the
t
modifier, the table of contents looks the same as the output of the
ls -l
(ell) command (see
ls(1)). - x
Save or restore device special files.
ftio
uses
mknod(2)
to recreate these files during a restore operation.
Thus, this modifier is restricted to users with appropriate privileges.
This is intended for intrasystem (backup) use.
Restoring device files onto a different system can be very dangerous. - A
If copying from tape
(-i
or
-I
option),
print all file names found on the tape archive,
noting which files have been restored.
This is useful when the user restores selected files,
but wants to know which (if any) files are on the tape. If copying to tape
(-o
or
-O
option),
the
A
modifier suppresses warning messages
regarding optional access control list entries.
ftio(1)
does not back up optional access control list entries
in a file's access control list (see
acl(5)).
Normally, a warning message is printed for each file that has
optional access control list entries. - E
When archiving, store all files having absolute path names
(that is, path names beginning with
/)
with path names relative to the root directory
(in other words, remove the leading
/).
On restoration, any files in the archive
that had an absolute path name before archiving
are restored relative to the current directory. - L
Same as the
-L
option, except that the file list
is left in the current directory as the file
ftio.list,
instead of the file named in
filelist. - P
On restoration, use
prealloc()
to allocate disk space beforehand for the file (see
prealloc(2)).
This vastly improves the localization of file fragments.
When end-of-tape is reached,
ftio
invokes
script
if the
-S
option was specified, rewinds the current tape,
then asks the user to mount the next tape. To pass one or more metacharacters to
ftio
without having the shell expand them,
protect them either by preceding each of them with a backslash (as in
/usr\*),
or enclosing them in protective single quotes (as in
'/usr*'). cpio Compatibilityftio
uses the same archive format as
cpio.
However, by default
ftio
creates tape headers and uses a tape block size of 16KB.
cpio
by default uses 512-byte blocks.
When used with the
-B
option,
cpio
uses 5120 byte blocks.
To achieve full compatibility with
cpio
in either input or output mode, the user should specify the
M
modifier.
ftio -oM
creates a single- or multi-tape archive that has no tape headers,
and, by default, the same block size as
cpio
-[o
|i]B.
An archive created by a
cpio -oB
command can be restored using
ftio -iM.
If the
M
modifier of
ftio
is combined with a
-B 512
block-size specification, full compatibility with
cpio
-[o|i]
(no
-B)
is achieved. EXTERNAL INFLUENCESEnvironment VariablesLC_COLLATE
determines the collating sequence used in evaluating pattern
matching notation for file name generation. LC_CTYPE
determines the characters matched by character class expressions
in pattern matching notation. LC_TIME
determines the format and contents of date and time strings. LANG
determines the language in which messages are displayed. If
LC_COLLATE,
LC_CTYPE,
or
LC_TIME
is not specified in the environment or is set to the empty string,
the value of
LANG
is used as a default for each unspecified or empty variable. If
LANG
is not specified or is set to the empty string, a default of
C (see
lang(5))
is used instead of
LANG.
If any internationalization variable contains an invalid setting,
ftio
behaves as if all internationalization variables are set to C.
See
environ(5). International Code Set SupportSingle-byte character code sets are supported. EXAMPLESCopy the entire contents of the file system
(including special files) onto tape drive
/dev/rtape/tape4QIC150:
ftio -ox /dev/rtape/tape4QIC150 / Restore all the files on
/dev/rtape/tape4QIC150,
relative to the current directory:
ftio -idxE /dev/rtape/tape4QIC150 List the contents of a backup set created using
ftio -o.
Note that use of the
v
modifier gives a more detailed listing,
and displays the contents of tape headers.
ftio -itv /dev/rtape/tape4QIC150 Show how to use the
.ftiorc
file:
Assume a
.ftiorc
file exists in the user's home directory and contains the following:
# Sample .ftiorc file.
I= cdmuvEpp -B 16k -S /usr/local/bin/ftio.change
O= cavEpp -Z 8 -B 16k -S /usr/local/bin/ftio.change Invoke
ftio
with the following command line to back up the user's
home directory and the operating system commands directory:
ftio -O /dev/rtape/tape4QIC150 /home/my_home /usr/sbin Specifying the
-O
option causes
ftio
to check the
.ftiorc
file for additional options.
In this case, character headers are generated,
access times are reset,
a listing of the files copied are printed to standard output,
all file names are copied to
/dev/rtape/tape4QIC150
with path names relative to
/,
performance data is printed when the backup is complete
(and at every tape change),
and, if the backup goes beyond one media the script,
/usr/local/bin/ftio.change
is invoked by
ftio
after each media is completed.
WARNINGSThe
fbackup,
frecover,
and
ftio
commands are deprecated for creating new archives.
In a future HP-UX release, creation of new archives with
these commands will not be supported.
Support will be continued for archive retrieval.
Use the standard
pax
command (portable archive interchange) to create archives. See
pax(1).
Because of industry standards and interoperability goals,
ftio
does not support the archival of files larger than 2GB or files that
have user/group IDs greater than 60K.
Files with user/group IDs greater than 60K are archived and restored
under the user/group ID of the current process. ftio
operates using System V shared memory and semaphores.
The resources committed to these functions are not
freed automatically by the system when the process terminates.
ftio
does this only when it terminates normally,
or when it terminates after receiving one the following signals:
SIGHUP,
SIGINT,
SIGTERM.
Any other signal is handled in the default manner described by
signal(2).
Note that the behavior for
SIGKILL
is to terminate the process without delay.
Thus, if
ftio
receives a
SIGKILL
signal (as might be produced by the indiscriminate use of
kill -9
(see
kill(1)),
system resources used for shared memory and semaphores
are not returned to the system.
If it becomes necessary to terminate an invocation of
ftio,
use
kill -15
instead.
Current system usage of shared memory and semaphores
can be checked using the
ipcs
command (see
ipcs(1)).
Committed resources can be removed using
ipcrm
(see
ipcrm(1)). AUTHORftio
was developed by HP. SEE ALSOcpio(1),
find(1),
ipcs(1),
ipcrm(1),
kill(1),
ls(1),
pax(1),
rmt(1M),
mknod(2),
prealloc(2),
signal(2),
uname(2),
acl(5),
environ(5),
lang(5),
regexp(5),
mt(7).
|