e2undo
e2undo is the e2fsprogs utility that restores recorded previous block contents from an undo log to an ext2, ext3 or ext4 filesystem.
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. [3] [4]
Default 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. [1] [2]
In 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. [2]
Native 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. [5]
The 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. [1] [4]
Relations
Advantages
- Dry-run mode can inspect a proposed replay without writing its saved blocks to the target. [1]
Limitations
- Saved overwritten blocks are not a complete backup and do not guarantee recovery from a power or system crash. [3, 4]
- Forced replay disables safeguards, and a partially completed replay is not automatically rolled back. [2]
Citations
- e2fsprogs v1.47.4: e2undo manual, replay safeguards and crash warning
- e2fsprogs v1.47.4: e2undo superblock checks, force mode and replay control flow
- e2fsprogs v1.47.4: undo I/O manager records previous block contents
- e2fsprogs v1.47.4: e2fsck undo-file option and crash limitation
- Hesela: e2undo replay controls on 1.47.0 and 1.47.4, methods and native evidence
Sources & caveats
- 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.