rustfs/rustfs · error · BackupError

backup manifest truncated: {reason}

Error message

backup manifest truncated: {reason}

What it means

BackupError variant meaning the backup bundle's manifest input ended before a complete manifest could be decoded — truncated file, short read, or premature EOF. It is fail-closed: a restore surface observing it must abort before touching target state. The reason string carries where decoding stopped; messages include only identifiers, never key material.

Source

Thrown at crates/kms/src/backup/error.rs:34

use thiserror::Error;

/// Typed failures raised while decoding or validating a backup bundle.
///
/// Every variant is a fail-closed condition: a restore surface observing any
/// of them must abort before touching target state. Messages carry only
/// identifiers (backup ids, KEK ids, artifact kinds and paths) — never key
/// material, bundle plaintext, or credentials.
#[derive(Error, Debug, Clone, PartialEq, Eq)]
pub enum BackupError {
    /// Manifest or bundle content fails structural, schema, or integrity
    /// validation (unknown fields, duplicate fields, digest mismatch,
    /// contradictory responsibility declarations, ...).
    #[error("backup bundle corrupted: {reason}")]
    Corrupted { reason: String },

    /// Input ended before a complete manifest could be decoded.
    #[error("backup manifest truncated: {reason}")]
    Truncated { reason: String },

    /// Manifest declares a format version this build does not understand.
    /// Unknown versions are always rejected; there is no best-effort read.
    #[error("unknown backup manifest format version {found} (this build supports version {supported})")]
    UnknownVersion { found: u32, supported: u32 },

    /// Bundle is protected by a different backup KEK than the one supplied.
    #[error(
        "backup bundle requires KEK '{required_kek_id}' version {required_kek_version}; \
         supplied KEK '{supplied_kek_id}' version {supplied_kek_version} cannot open it"
    )]
    WrongKek {
        required_kek_id: String,
        required_kek_version: u32,
        supplied_kek_id: String,
        supplied_kek_version: u32,
    },

View on GitHub (pinned to 35af688cd9)

Solutions

  1. Re-transfer the bundle and check for truncation in transit/storage
  2. Re-create the backup if the source is also incomplete
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/kms/src/backup/error.rs:34 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of rustfs/rustfs@35af688cd9 (2026-08-20). Data as JSON: /api/errors/a7b8d718a0340841. Report an issue: GitHub.