Backup3G/EWC/Man Pages
From Documentation
< Backup3GRevision as of 06:37, 19 February 2008; view current revision
←Older revision | Newer revision→
←Older revision | Newer revision→
devio
NAME
- devio - handle I/O to devices such as tape drives
SYNOPSIS
devio -i|o [-bcdLmnprs1] [command]
DESCRIPTION
- Devio reads data from or writes data to either a disk file or a device such as a tape drive. Devio can be called several times in succession to write to a set of tapes or other media, and handle volume changes as necessary.
- Normally devio reads from the device, passing data to standard output (-i option) or writes to the device, obtaining data from standard input (-o option). However, if a command is given as a parameter (which must be quoted to ensure that it is passed as a single parameter), then it is executed, and data is piped to or from that process. Devio will then terminate with the same exit status as this process. This is useful if devio is called from a shell script which needs to know whether the data transfer was successful.
OPTIONS
-i Devio will read data from the device, passing it to STDOUT or to the standard input of the optional command. -o Devio will write data to the device, reading it from STDIN or from the standard output of the optional command. -d device I/O will be done to the specified device or file. Typically this would be a Windows tape device name, such as tape0. If this option is omitted, the environment variable TAPE should specify the device. -n name This specifies a name by which the user knows the device, as specified by the -d option. If this option is specified, then any user messages referring to the device will use the specified name, rather than the Windows device name. -b blocksize The blocksize in KB that should be used for I/O to the device. The default is 64KB. -c capacity The capacity in KB of each volume. This figure should be the amount of data that can safely be written. Devio will request a change of volume after this amount has been read or written. The default is unlimited capacity, implying that media changes will occur at physical end of volume or on an I/O error. -m command A command to run to change the volume in the device. This command should exit with a status of 0 when the drive is ready and loaded with the new volume. It can also optionally write the name of the next device to use on its STDOUT (if it has changed). A non-zero exit status will cause devio to exit with that status. This command can also do things like checking for or writing a label on the new tape. -s startpos The amount of data in KB to to skip or that has already been written on the first volume. This tells devio how much data can still fit (if writing) or remains (if reading) on the first volume. On subsequent volumes it is assumed that the full capacity (given by -c) is available. The default is 0, i.e.: starting at the beginning of the volume. -r amount The amount of data in KB that devio should read. This is only applicable with the -i option, and is only necessary on devices, such as floppy disks, which have no mechanism for delimiting files or datasets on the one volume. By default devio will read to end of file. -P volsizes The amounts of data in KB that devio should read on each volume. If more than one size is given, devio will read the first amount, request a volume change, and continue to read the second amount etc. This is only applicable with the -i option. By default devio will stop at end of file. -L Indicates that the data being read or written is a single block tape label. Unless -b is specified, this will be a 512 byte block. -p Indicates that all blocks are to be written at the specified blocksize. Normally devio will write a short last block if there is insufficient data to fill the block. This flag will cause such a block to be NULL padded. -1 Indicates that at least one block should be written to the device, even if there is no input data. This is useful for jobs which write multiple files to one tape, and want to ensure that the relative positions of each file is constant, even if one file is empty. Many tape devices have no means of writing an empty file. -u Causes devio to write details of the amounts of data written, the elapsed time & rate to the given file.
EXAMPLES
devio -o -b32 -d tape0 'FSntcpio -f C:/local'
- Write a backup of C:/local to tape device tape0 using 32K blocksize.
devio -i -b32 -d tape0 'FSntcpio -r C:/tmp'
- Recover the contents of tape device tape0 to C:/tmp. Data is read from tape0 in 32K blocks and passed to FSntcpio.
SEE ALSO
COPYRIGHT
- Copyright © 1990-2024 Functional Software. All rights reserved.
- Based on version 4.1 - Last modified 24th January 2008.
^ |