# info > E2UNDO

---
type: CommandReference
command: e2undo
mode: man
section: 8
source: man-pages
---

## Quick Reference
- `e2undo undo_log device` — replay undo log to device
- `e2undo -n undo_log device` — dry-run without writing blocks
- `e2undo -f undo_log device` — force replay (skip superblock match check)
- `e2undo -v undo_log device` — verbose, report current block
- `e2undo -o offset undo_log device` — replay at specified filesystem offset
- `e2undo -z backup_undo undo_log device` — save old block contents to backup undo file before overwriting

## Name
e2undo - Replay an undo log for an ext2/ext3/ext4 file system

## Synopsis
shell
e2undo [ -f ] [ -h ] [ -n ] [ -o offset ] [ -v ] [ -z undo_file ] undo_log device
## Options
- `-f` — Force replay. Disables the superblock mismatch safety check.
- `-h` — Display usage message.
- `-n` — Dry-run; do not actually write blocks back to the filesystem.
- `-o offset` — Specify the filesystem offset (in bytes) from the start of the device or file.
- `-v` — Verbose; report which block is currently being replayed.
- `-z undo_file` — Before overwriting a filesystem block, write its old contents to an undo file for potential rollback. If an empty string is given, the backup is stored as `e2undo-device.e2undo` in the directory specified by `E2FSPROGS_UNDO_DIR`. **Warning**: this undo file cannot recover from power or system crashes.

## See Also
- [mke2fs(8)](http://localhost/phpMan.php/man/mke2fs/8/markdown)
- [tune2fs(8)](http://localhost/phpMan.php/man/tune2fs/8/markdown)