{
  "slug": "e2undo",
  "term": "e2undo",
  "aliases": [
    "e2fsprogs undo-log replay"
  ],
  "definition": "e2undo is the e2fsprogs utility that restores recorded previous block contents from an undo log to an ext2, ext3 or ext4 filesystem.",
  "note": "An e2fsprogs operation can record old block contents before overwriting them, for example through e2fsck's -z option. e2undo replays those saved contents; the undo file is not a complete filesystem backup. [producer] [e2fsck-manual]\n\nDefault replay compares the target superblock with the recorded state, not every file. The -n dry run omits replay writes to the target but cannot prove that a later write will succeed. [manual] [implementation]\n\nIn v1.47.4, -f also relaxes undo-file checksum checks. Replay is not an all-or-nothing transaction: a later I/O failure does not reverse earlier writes. The final exit value does not incorporate every reported I/O error. [implementation]\n\nNative controls on 1.47.0 and 1.47.4 returned status 0 after a deliberately limited write left partial restoration and an I/O-error diagnostic. A separate unlogged payload change survived replay and a status-0 e2fsck check. Seven regular-file cases per version were repeated on one host; this is not a power-loss experiment. [native]\n\nThe manuals exclude power or system crash recovery using an undo file. Retain diagnostics, preserve an independent image or backup, and check expected file contents separately from filesystem structures. [manual] [e2fsck-manual]",
  "status": "shipping",
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-12-04",
  "advantages": [
    {
      "text": "Dry-run mode can inspect a proposed replay without writing its saved blocks to the target.",
      "citationIds": [
        "manual"
      ]
    }
  ],
  "limitations": [
    {
      "text": "Saved overwritten blocks are not a complete backup and do not guarantee recovery from a power or system crash.",
      "citationIds": [
        "producer",
        "e2fsck-manual"
      ]
    },
    {
      "text": "Forced replay disables safeguards, and a partially completed replay is not automatically rolled back.",
      "citationIds": [
        "implementation"
      ]
    }
  ],
  "related": [
    "e2fsck",
    "crash-consistent-filesystem-repair"
  ],
  "citations": [
    {
      "id": "manual",
      "title": "e2fsprogs v1.47.4: e2undo manual, replay safeguards and crash warning",
      "url": "https://raw.githubusercontent.com/tytso/e2fsprogs/v1.47.4/misc/e2undo.8.in",
      "accessed": "2026-12-04"
    },
    {
      "id": "implementation",
      "title": "e2fsprogs v1.47.4: e2undo superblock checks, force mode and replay control flow",
      "url": "https://raw.githubusercontent.com/tytso/e2fsprogs/v1.47.4/misc/e2undo.c",
      "accessed": "2026-12-04"
    },
    {
      "id": "producer",
      "title": "e2fsprogs v1.47.4: undo I/O manager records previous block contents",
      "url": "https://raw.githubusercontent.com/tytso/e2fsprogs/v1.47.4/lib/ext2fs/undo_io.c",
      "accessed": "2026-12-04"
    },
    {
      "id": "e2fsck-manual",
      "title": "e2fsprogs v1.47.4: e2fsck undo-file option and crash limitation",
      "url": "https://raw.githubusercontent.com/tytso/e2fsprogs/v1.47.4/e2fsck/e2fsck.8.in",
      "accessed": "2026-12-04"
    },
    {
      "id": "native",
      "title": "Hesela: e2undo replay controls on 1.47.0 and 1.47.4, methods and native evidence",
      "url": "https://hesela.dev/research/e2undo-replay/README.md",
      "accessed": "2026-12-04"
    }
  ],
  "provenance": [
    "Pinned e2fsprogs v1.47.4 manuals and source reviewed; the final return expression was checked against the native I/O-error control.",
    "Seven regular-file configurations per version, repeated twice on one Linux host. Version 1.47.0 is installed; 1.47.4 was locally compiled from the linked upstream archive.",
    "The artificial RLIMIT_FSIZE error is not a device fault, power failure, journal-recovery test or reproduction of FAST 2018 rfsck."
  ]
}
