Next: Record Header Up: Storage Media Output Format Previous: Serialization Contents Index

#
Block Header

The format of the Block Header (version 1.27 and later) is:

       uint32_t CheckSum;                /* Block check sum */
       uint32_t BlockSize;               /* Block byte size including the header */
       uint32_t BlockNumber;             /* Block number */
       char ID[4] = "BB02";              /* Identification and block level */
       uint32_t VolSessionId;            /* Session Id for Job */
       uint32_t VolSessionTime;          /* Session Time for Job */

The Block header is a fixed length and fixed format and is followed by Record Headers and Record Data. The CheckSum field is a 32 bit checksum of the block data and the block header but not including the CheckSum field. The Block Header is always immediately followed by a Record Header. If the tape is damaged, a Bacula utility will be able to recover as much information as possible from the tape by recovering blocks which are valid. The Block header is written using the Bacula serialization routines and thus is guaranteed to be in machine independent format. See below for version 2 of the block header.