Difference between revisions of "Unix dump/restore tape format"

From Computer History Wiki
Jump to: navigation, search
(This stub is not ok at all.)
 
(Overview.)
Line 1: Line 1:
It's a bit of a mess.
+
The [[Unix]] dump command makes a full or incremental backup of a single [[disk]] partition to [[magnetic tape]]s.  The corresponding restore command recovers data from such tapes.  The tape format is vaguely documented in various man pages, but not to a detail necessary to fully understand it.
 +
 
 +
A dump is logically a series of 1024-byte [[block]]s, grouped ten at a time into tape [[record]]s.  A block can be a [[header]], or data.  Header blocks hold metadata and inode information.
 +
 
 +
Dumps will normally span several tapes.  All tapes begin with a '''TS_TAPE''' block.  The last tape ends with one or several '''TS_END''' blocks.  The first tape will have '''TS_BITS''' and '''TS_CLRI''' blocks after TS_TAPE.  The rest of the tape blocks are of type '''TS_INODE''', storing raw inodes as stored on disk, followed by data blocks.  In some cases a TS_NODE header can not store all information needed, in which case it can be extended with '''TS_ADDR''' blocks.  Normally the first inodes written to tape is the entire directory structure of the whole file system, and file inodes make up the rest of the tapes. 
 +
 
 +
Details to follow.  It's a bit of a mess.

Revision as of 11:24, 7 September 2022

The Unix dump command makes a full or incremental backup of a single disk partition to magnetic tapes. The corresponding restore command recovers data from such tapes. The tape format is vaguely documented in various man pages, but not to a detail necessary to fully understand it.

A dump is logically a series of 1024-byte blocks, grouped ten at a time into tape records. A block can be a header, or data. Header blocks hold metadata and inode information.

Dumps will normally span several tapes. All tapes begin with a TS_TAPE block. The last tape ends with one or several TS_END blocks. The first tape will have TS_BITS and TS_CLRI blocks after TS_TAPE. The rest of the tape blocks are of type TS_INODE, storing raw inodes as stored on disk, followed by data blocks. In some cases a TS_NODE header can not store all information needed, in which case it can be extended with TS_ADDR blocks. Normally the first inodes written to tape is the entire directory structure of the whole file system, and file inodes make up the rest of the tapes.

Details to follow. It's a bit of a mess.