tape: improve catalog consistency checks

Try to check if we read the correct catalog by verifying uuid, media_set_uuid
and seq_nr.

Note: this changes the catalog format again.
This commit is contained in:
Dietmar Maurer
2021-03-18 08:43:55 +01:00
parent caf76ec592
commit 237314ad0d
4 changed files with 53 additions and 12 deletions

View File

@ -213,6 +213,17 @@ pub struct SnapshotArchiveHeader {
pub store: String,
}
#[derive(Deserialize, Serialize)]
/// Header for Catalog archives
pub struct CatalogArchiveHeader {
/// The uuid of the media the catalog is for
pub uuid: Uuid,
/// The media set uuid the catalog is for
pub media_set_uuid: Uuid,
/// Media sequence number
pub seq_nr: u64,
}
#[derive(Serialize,Deserialize,Clone,Debug)]
/// Media Label
///