This header describes three formats for the ufsdump/ufsrestore interface:
o
An old format, non-MTB, that supports dump sizes of less than 2 terabytes. This format is represented by NFS_MAGIC.
o
A new format, MTB, that supports dump sizes of greater than 2 terabytes using a variable block size and 2 new constants: TP_BSIZE_MIN and TP_BSIZE_MAX. This format is represented by MTB_MAGIC.
o
A much older format that might be found on existing backup tapes. The ufsrestore command can restore tapes of this format, but no longer generates tapes of this format. Backups in this format have the OFS_MAGIC magic number in their tape headers.
The constants are described as follows:
TP_BSIZE
Size of file blocks on the dump tapes for the old format. Note that TP_BSIZE must be a multiple of DEV_BSIZE This is applicable for dumps
of type NFS_MAGIC or OFS_MAGIC, but is not applicable for dumps of type MTB_MAGIC.
TP_BSIZE_MIN
Minimum size of file blocks on the dump tapes for the new MTB format (MTB_MAGIC) only.
TP_BSIZE_MAX
Maximum size of file blocks on the dump tapes for the new MTB format (MTB_MAGIC) only.
NTREC
Number of TP_BSIZE blocks that are written in each tape record.
HIGHDENSITYNTREC
Number of TP_BSIZE blocks that are written in each tape record on 6250 BPI or higher density tapes.
CARTRIDGETREC
Number of TP_BSIZE blocks that are written in each tape record on cartridge tapes.
TP_NINDIR
Number of indirect pointers in a TS_INODE or TS_ADDR record. It must be a power of 2.
TP_NINOS
The maximum number of volumes on a tape.
LBLSIZE
The maximum size of a volume label.
NAMELEN
The maximum size of a host's name.
OFS_MAGIC
Magic number that is used for the very old format.
NFS_MAGIC
Magic number that is used for the non-MTB format.
MTB_MAGIC
Magic number that is used for the MTB format.
CHECKSUM
Header records checksum to this value.
The TS_ entries are used in the c_type field to indicate what sort of header this is. The types and their meanings are as follows:
TS_TAPE
Tape volume label.
TS_INODE
A file or directory follows. The c_dinode field is a copy of the disk inode and contains bits telling what sort of file this is.
TS_ADDR
A subrecord of a file description. See s_addrs below.
TS_BITS
A bit map follows. This bit map has a one bit for each inode that was dumped.
TS_CLRI
A bit map follows. This bit map contains a zero bit for all inodes that were empty on the file system when dumped.
TS_END
End of tape record.
TS_EOM
diskette EOMindicates that the restore is compatible with old dump
The flags are described as follows:
DR_NEWHEADER
New format tape header.
DR_INFODEINFO
Header contains starting inode info.
DR_REDUMP
Dump contains recopies of active files.
DR_TRUEINC
Dump is a "true incremental".
DR_HASMETA
The metadata in this header.
DUMPOUTFMT
Name, incon, and ctime (date) for printf.
DUMPINFMT
Inverse for scanf.
The fields of the header structure are as follows:
s_addrs
An array of bytes describing the blocks of the dumped file. A byte is zero if the block associated with that byte was not present on the file system; otherwise, the byte is non-zero. If the block was not present on the
file lsystem, no block was dumped; the block will be stored as a hole in the file. If there is not sufficient space in this record to describe all the blocks in a file, TS_ADDR records will be scattered through the file, each one picking up where the last
left off
s_inos
The starting inodes on tape.
c_type
The type of the record.
c_date
The date of the previous dump.
c_ddate
The date of this dump.
c_volume
The current volume number of the dump.
c_tapea
The logical block of this record.
c_inumber
The number of the inode being dumped if this is of type TS_INODE.
c_magic
This contains the value MAGIC above, truncated as needed.
c_checksum
This contains whatever value is needed to make the record sum to CHECKSUM.
c_dinode
This is a copy of the inode as it appears on the file system.
c_count
The count of bytes in s_addrs.
u_data c_data
The union of either u_data c_data The union of either s_addrs or s_inos.
c_label
Label for this dump.
c_level
Level of this dump.
c_filesys
Name of dumped file system.
c_dev
Name of dumped service.
c_host
Name of dumped host.
c_flags
Additional information.
c_firstrec
First record on volume.
c_spare
Reserved for future uses.
c_tpbsize
Tape block size for MTB format only.
Each volume except the last ends with a tapemark (read as an end of file). The last volume ends with a TS_END record and then the tapemark.
The dump history is kept in the file /etc/dumpdates. It is an ASCII file with three fields separated by white space:
o
The name of the device on which the dumped file system resides.
o
The level number of the dump tape; see ufsdump(1M).
o
The date of the incremental dump in the format generated by ctime(3C).
DUMPOUTFMT is the format to use when using printf(3C) to write an entry to /etc/dumpdates; DUMPINFMT is the format to use when using scanf(3C) to read an entry from /etc/dumpdates.
ATTRIBUTES
See attributes(5) for a description of the following attributes: