Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mdtar(1) — Ultrix/UWS 4.4 RISC

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

stat(2)

tar(1)

mdtar(1)

Name

mdtar − multivolume archiver

Syntax

mdtar [key] [name...]

Description

The mdtar command saves multiple files on  multiple archives (usually an  RX50 diskette, but any file/device may be specified). mdtar actions are controlled by the key argument.  The key is a string of characters containing one function letter and one or more function modifiers.  Other arguments to mdtar are file or directory names specifying which files to dump or restore. In all cases, appearance of a directory name refers to the files and, recursively, subdirectories of that directory. mdtar also saves special files.

This utility supports EOT handling which allows the use of multiple media.  The utility prompts for the next volume when it encounters the end of the current volume. 

This utility supports the TA90 style sequential stacker loader device.  The device ejects a cartridge when it is taken off line.  This utility performs the device ejection on behalf of the user when it encounters a multivolume boundary during write or read operations involving tape.  The device then automatically loads the next available tape (if there is one).  The utility then attempts to access this next tape for a reasonable amount of time (approximately three minutes) before prompting the user for a manual reload operation. 

Options

−CChanges directory to specified name. This allows multiple directories not related by a close common parent, to be archived using short relative path names.  For example, to archive files from /usr/include and from /etc, one might use

mdtar c −C /usr include . −C /etc .

The function portion of the key is specified by a letter. 

cCreates a new archive.  Writing begins at the beginning of the archive instead of after the last file. 

rWrites the named files to the end of the archive. 

tGenerates archive table of contents.  If no argument is given, all of the names on the archive are listed. 

uUpdates the current archive.  Adds the named files to the archive, if they are not there already or if they have been modified since last put on the archive. 

xExtracts each specified file from the archive.  If the named file matches a directory whose contents had been written onto the archive, this directory is recursively extracted.  The owner, modification time, and mode are restored if you are the superuser and if you have also specified the p switch.  If no file argument is given, the entire content of the archive is extracted.  If multiple entries specifying the same file are on the archive, the last one overwrites previous versions. 

The following characters may be used to qualify the function desired in addition to one or more of the above letters.

0...9Selects unit number of the drive as an alternate disk drive.  The default disk drive is the device named /dev/rra1a.

AUses the specified number (next argument) as archive with which to begin the output.  This switch is intended for error recovery.  mdtar outputs files in terms of Archives. Each Archive contains a number of files. If mdtar has been requested to dump a path (set of files) that consist of (for example) 10 archives and there is an error writing the nth Archive, then the A modifier may be used to restart mdtar at the nth Archive.

CAUTION

You must issue the same path (set of files) as in the first command. This will guarantee that mdtar will begin at the correct file on Archive n.

If the v mode is specified, mdtar outputs informational messages to inform the user of progress. For example, the following command will dump the entire directory structure:

mdtar cv

If an error occurs on Archive 7, to restart at the 7th Archive, without having to re-dump the first 6 Archives, issue the following command:

mdtar cvA 7

mdtar will tell you it is skipping the first 6 Archives and will resume output with the data that begins Archive 7.

bUses the specified number (next argument) as the blocking factor.  The default is 20 (the maximum is 20). 

BForces output blocking to 20 blocks per record. 

fUses the specified file (next argument) as the name of the archive.  If the name of the file is −, mdtar writes to standard output (piping).

F[F]Operates in fast mode.  When F is specified, mdtar skips all SCCS directories, core files, and errs files. When FF is specified, mdtar also skips all a.out and *.o files.

hSaves a copy of the file (excludes symbolic links).  The default action of mdtar is to place symbolic link information on the output device. A copy of the file IS NOT saved on the output device.

iIgnores checksum errors found in the archive. 

lDisplays an error message if all links to the files dumped cannot be resolved. If −l is not specified, no error messages are printed. 

LPermits the program to treat the tape drive as a sequential loader device even though it is not represented as such in the system driver tables. 

mDoes not restore file modification times.  The modification time is the time of extraction.  Normally, mdtar restores modification times of regular and special files.

oSuppresses the normal directory information.  On output, mdtar normally places information specifying owner and modes of directories in the archive.  Former versions of mdtar, when encountering this information will give the error message

<name>/: cannot create.

pRestores the named files to their original modes, ignoring the present umask(.). Setuid and sticky information will also be restored to the super-user. You must be Superuser to perform this option. For further information, see stat(,), S_ISVTX.

sUses specified number (next argument) as size of media in 512-byte blocks.  This enables mdtar to be used with devices of different physical media sizes. The default is 800 blocks (assumption is an RX50 output Archive).

vDisplays detailed (verbose) information as it archives files.  Normally mdtar does its work silently. With the t function, the verbose option gives more information about the archive entries than just their names. 

#cd
#mdtar cvf mdtar-out vmunix

Produces the output “a vmunix 1490 blocks” where 1490 is the number of 512 byte blocks in the file “vmunix”.

#mdtar xvf mdtar-out

Produces the output “x vmunix, 762880 bytes, 1490 blocks” where 762880 is the number of bytes and 1490 is the number of 512 byte blocks in the file “vmunix” which was extracted.

wDisplays action to be taken for each file and prompts for confirmation.  If a word beginning with ‘y’ is given, the action is done. Any other input means do not do it. 

Restrictions

The u option can be slow. 

The current limit on file name length is 100 characters. 

There is no way to follow symbolic links selectively. 

On SCSI tape devices tar (when reading) may end on one volume of a multivolume set without prompting for the next volume. This is a very infrequent condition. The next volume should be loaded and the command issued again. 

Using a blocking factor other than the default (b option) may lead to higher performance.  However, you must select a value that is compatible with the hardware limitations of the source and destination machines.  Software limitations may apply for other versions of tar.

When extracting (x), tar reads the entire tape. See the r and u keys. 

The u and the r function keys do not operate with quarter-inch tape cartidge drives such as the TZK10. 

ULTRIX tar, due to BSD coding, does not completely fill a flexible disc in multivolume situations.

In multivolulme situations, ULTRIX tar employs the following header rules for volume-spanning files.  At the beginning of the next volume, a second header is written that includes both the full size of the file and the size of the file segment that is written on the second volume. The first header states the full size of the file only.  These rules may not be compatible with other systems’ versions of tar.

Diagnostics

Indicates bad key characters and archive read/write errors. 

Indicates if enough memory is not available to hold the link tables. 

Files

/tmp/tar*

See Also

stat(2), tar(1)

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