Tape volume labels are created by the Storage daemon in response to a label command given to the Console program, or alternatively by the btape program. created. Each volume is labeled with the following information using the Bacula serialization routines, which guarantee machine byte order independence.
For Bacula versions 1.27 and later, the Volume Label Format is:
char Id; /* Bacula 1.0 Immortal\n */ uint32_t VerNum; /* Label version number */ /* VerNum 11 and greater Bacula 1.27 and later */ btime_t label_btime; /* Time/date tape labeled */ btime_t write_btime; /* Time/date tape first written */ /* The following are 0 in VerNum 11 and greater */ float64_t write_date; /* Date this label written */ float64_t write_time; /* Time this label written */ char VolName; /* Volume name */ char PrevVolName; /* Previous Volume Name */ char PoolName; /* Pool name */ char PoolType; /* Pool type */ char MediaType; /* Type of this media */ char HostName; /* Host name of writing computer */ char LabelProg; /* Label program name */ char ProgVersion; /* Program version */ char ProgDate; /* Program build date/time */
Note, the LabelType (Volume Label, Volume PreLabel, Session Start Label, ...) is stored in the record FileIndex field of the Record Header and does not appear in the data part of the record.