E2UNDO(8)

๐Ÿ’– E2UNDO ๐Ÿ’–

okay bestie, so this is e2undo from the e2undo(8) corner of the System Manager's Manual, and it's literally the "oops, undo that" button for your ext2/ext3/ext4 file systems. no cap. let's get into it ๐Ÿซถ


โœจ NAME โœจ

e2undo โ€” replay an undo log for an ext2/ext3/ext4 file system ๐Ÿ’…


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

e2undo [ -f ] [ -h ] [ -n ] [ -o offset ] [ -v ] [ -z undo_file ]
undo_log device

๐ŸŒธ DESCRIPTION ๐ŸŒธ

so here's the vibe: e2undo will replay the undo log undo_log for an ext2/ext3/ext4 file system that's chillin' on device. โœจ

and like, why do you care? because this is how you undo a failed operation by an e2fsprogs program. the program fumbled, the undo log remembers what things looked like before, and e2undo puts it all back. main character energy fr fr. ๐Ÿ‘‘


๐Ÿ’… OPTIONS ๐Ÿ’…

  • -f โ€” normally, e2undo checks the file system superblock to make sure the undo log actually matches the file system on device. if they don't match, e2undo will refuse to apply the undo log as a safety mechanism (iconic behaviour honestly, it's looking out for you ๐Ÿฅบ). the -f option disables this safety mechanism. so yeah, you're on your own after that. ๐Ÿ˜ญ
  • -h โ€” display a usage message. short king of flags, tells you how to use it. ๐ŸŽ€
  • -n โ€” dry-run; do not actually write blocks back to the file system. it's giving "just looking, not touching". ๐Ÿ™ˆ
  • -o offset โ€” specify the file system's offset (in bytes) from the beginning of the device or file. numbers, bestie, in bytes. ๐Ÿ”ข
  • -v โ€” report which block we're currently replaying. very "not me narrating my own work" but honestly we love the transparency. โœจ
  • -z undo_file โ€” before overwriting a file system block, write the old contents of the block to an undo file. this undo file can be used with e2undo(8) to restore the old contents of the file system should something go wrong. ๐Ÿงš

if the empty string is passed as the undo_file argument, the undo file will be written to a file named e2undo-device.e2undo in the directory specified via the E2FSPROGS_UNDO_DIR environment variable. yes, that's a real env var, write it down. ๐Ÿ“

WARNING: the undo file cannot be used to recover from a power or system crash. ๐Ÿ’€ like, that's not what it's for, bestie. do not test this. do not. ๐Ÿ™…

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

e2undo was written by Aneesh Kumar K.V. (aneesh.kumar@linux.vnet.ibm.com). giving credit where credit is due, periodt. ๐Ÿ’œ


๐ŸŒˆ AVAILABILITY ๐ŸŒˆ

e2undo is part of the e2fsprogs package and is available from http://e2fsprogs.sourceforge.net. go get it, it's free, it's iconic. โญ


๐Ÿ“ SEE ALSO ๐Ÿ“

iykyk โ€” go read those next, bestie. ๐Ÿ“š


and that's the whole page!! this was E2fsprogs version 1.47.4, dated March 2025, and it's the E2UNDO(8) manual page, signing off. mwah. ๐Ÿ’–โœจ๐ŸŽ€๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from