Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ftio(1) — HP-UX 6.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cpio(1)

find(1)

ipcs(1)

ipcrm(1)

mt(7)

FTIO(1)  —  HP-UX

Series 300, 500 Only

NAME

ftio − faster tape I/O

SYNOPSIS

ftio −o | −O [ achpvxELM ] [ −B blksize ] [ −K comment ] [ −L filelist ] [ −N datefile ] [ −S script ] [ −T tty ] [ −Z nobufs ] tapedev [ pathnames ] [ −F ignorenames ]

ftio −i | −I [ cdfmptuvxAEMPR ] [ −B blksize ] [ −T tty ] [ −S script ] [ −Z nobufs ] tapedev [ patterns ]

ftio −g [ v ] tapedev [ patterns ]

DESCRIPTION

Ftio is a tool designed specifically for copying files to 9 track magnetic tape drives.  It should perform faster than either cpio(1) or tar(1) in comparable situations.  Ftio uses multiple processes (to read/write the file system and to write/read the tape device) with large amounts of shared memory between the 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(1) is always readable by ftio, and output from ftio is readable with exceptions by cpio(1).  See the Cpio Compatibility section below for a more detailed explanation. 

Ftio must be invoked with exactly one of the options −o, −O, −i, −I, or −g.  The option can be followed by modifiers, which must appear immediately after the option with no spaces between the option and the modifier, for example, ftio −idxE.  See the Modifiers section below. 

Options

The available options are:

-o Copy out files onto tapedev together with path name and status information.  If pathnames is specified, ftio recursively descends pathnames looking for files, and copies those files onto tapedev.  If not, ftio reads the standard input to obtain a list of path names to copy.  In addition to copying the files onto the tape set, ftio generates, for each tape in the tape set, a tape header containing the current tape number, machine nodename and type, operating system name, release and version numbers (all from uname(2)), username of the backup initiator, time and date of the backup, 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 archive by an end of file mark.  The tape header can be read by invoking cat(1) with the device file name as the first argument.  Note that device files written with the −o option (e.g., /dev/tty03) will not transport to other implementations of HP-UX. 

-O Copy out files in the same way as ftio -ocva, if no modifiers are used with the −O.  However, if the file .ftiorc 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 passed in the original command.  See the EXAMPLES section. 

−i Extract, or copy in, files from tapedev, which is assumed to be the product of a previous ftio -o operation.  Only files with names that match patterns are selected.  Patterns are given in the name-generating notation of sh(1).  In patterns, meta-characters ?, ∗, and [...] match the slash / character.  Multiple patterns may be specified and if no patterns are specified, the default for patterns is ∗ (i.e., 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, or copy in, files in the same way as for ftio -icdmv, if no modifiers are used with the −I.  However, if the file .ftiorc 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 passed in the original command.  See the EXAMPLES section. 

−g Read the file list on 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, and, therefore, only the last volume is valid in this respect. 

−B blksize Specify the size (in bytes) of blocks written to tape.  This number may end with k, which specifies multiplication by 1024.  The use of larger blocks generally improves performance and tape usage.  The maximum block size allowed 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. 

−F ignorenames Arguments following -F specify patterns that should not be copied to the tape. The same rules apply for ignorenames as do for patterns, see the previous description for ftio -i. 

−K comment Specify a comment to be placed in the ftio tape header. 

−L filelist If pathnames is specified, perform the file search and generate a list of files to back up 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 of where the files are in the archive set.  If pathnames is not specified, the file list is taken from standard input before the backup begins.  Filelist specifies the output file.  In addition to generating file lists, the -L option implements tape checkpointing, allowing the backup to restart from a write failure on a bad medium. 

−M Do not generate or expect tape headers, and change the default block size to 5120 bytes.  This allows for full compatibility with cpio(1).  See the Cpio Compatibility section below. 

−N datefile Only files that are newer than the file specified in datefile are copied to tape. 

−R Automatically resync when ftio gets out of phase.  This is useful when restoring from a multi-tape backup on tapes other than the first.  The default behavior is that ftio asks the user if resyncing is required. 

−S script Specify a command that is invoked every time a tape is completed in a multi-tape backup.  The command is invoked by sh(1) with the following arguments:  script tape_no user_name.  Script is the string script specified by 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 alternate 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.  The use of more chunks is usually better, but a point is reached where no improvement is gained, and in fact performance may deteriorate as buffer space is swapped out of main memory.  A default value of 16 is set for nobufs, but the use of 32 or 64 may improve performance if your system is relatively unloaded. We recommend performing a backup with the system in single user mode.

Modifiers

a After files have been copied out to tape, reset the access time so that it appears the file had not been 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.  Normally, ftio archives the link itself. 

m Retain previous file modification time and ownership of file.  Restoration of modification time is ineffective on 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 change reel time), and the effective transfer rate calculated from these figures.  These values are printed at the end of each tape if p is given twice. 

t Print only a table of contents of the input.  No files are created, read, or copied. 

u Copy unconditionally (normally, an older file will not replace a newer file with the same name). 

v Be verbose.  Print a list of file names as well as tape headers.  When used with the t modifier, the table of contents looks the same as the output of ls -l 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 the superuser. This is intended for intrasystem (backup) use. Restoring device files onto a different system can be very dangerous.

A Print all file names found on the archive, noting which files have been restored.  This is useful when the user is restoring selected files, but wants to know which (if any) files are on the tape. 

E When archiving, store all files with absolute path names with a path name relative to the root directory, i.e., all files whose name starts with / have the first / removed.  On restoration, any files in the archive that have an absolute path name have the leading / removed from the path name and are restored relative to the current directory. 

L Behaves the 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(2) to pre-allocate disk space for the file.  This vastly improves the localization of file fragments. 

When the end of the tape is reached, ftio invokes script if the -S option has been exercised, rewinds the current tape, and then asks the user to mount the next tape. 

To pass one or more metacharacters to ftio without the shell expanding them, protect them by either preceding each of them with a backslash (e.g., /usr\*), or enclosing them in protective quotes (e.g., ’/usr*’). 

Cpio Compatibility

Ftio uses the same archive format as cpio(1). However, the default behavior of ftio is to create tape headers and to use a tape block size of 16k bytes. Cpio(1) by default uses 512 byte blocks.  When used with the −B option, cpio(1) uses 5120 byte blocks.  To achieve full compatibility with cpio(1) 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 may 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. 

EXAMPLES

The first example below copies the entire contents of the file system (including special files) onto the tape drive /dev/rmt/0h:

ftio -ox /dev/rmt/0h /

The following example restores all the files on /dev/rmt/0h, relative to the current directory:

ftio -idxE /dev/rmt/0h

The following example demonstrates how to list the contents of a backup set created using ftio -o:

ftio -itv /dev/rmt/0h

Note that use of the v modifier gives a more detailed listing, and displays the contents of tape headers. 

The next example demonstrates the use of the .ftiorc file.  A .ftiorc file exists in the user’s home directory with the following contents:

# Example .ftiorc file. 

I= cdmuvEpp -B 16k -S /usr/local/bin/ftio.change

O= cavEpp -Z 8 -B 16k -S /usr/local/bin/ftio.change

Ftio is invoked with the following command line to backup the users home directory and the system binary directory:

ftio -O /dev/rmt/0h /user/my_home /bin

Because the -O option has been specified, the .ftiorc will be checked 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/rmt/0h with path names relative to /, performance data are 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. 

WARNINGS

Ftio uses System V shared memory and semaphores for its operation.  The resources committed to these functions are not automatically freed 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.  Current system usage of shared memory and semaphores can be checked using ipcs(1). Committed resources can be removed using ipcrm(1).

DEPENDENCIES

Series 500
The −T option and h modifier are not currently supported. 

AUTHOR

Ftio was developed by HP. 

SEE ALSO

cpio(1), find(1), ipcs(1), ipcrm(1), mt(7). 

Hewlett-Packard Company  —  Version B.1,  May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026