← 返回命令列表

Linux command

e2image 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Example

e2image [/dev/sdXN] [path/to/image_file]

Example

e2image [/dev/sdXN] -

Restore

e2image -I [/dev/sdXN] [path/to/image_file]

Example

e2image -r [/dev/sdXN] [path/to/image_file]

Example

e2image -Q [/dev/sdXN] [path/to/image_file]

Example

e2image -r -s [/dev/sdXN] - | bzip2 > [hda1.e2i.bz2]

说明

e2image saves critical ext2/ext3/ext4 filesystem metadata to a file. This is useful for backing up filesystem structure for disaster recovery or debugging filesystem corruption issues. The image file contains only metadata (superblock, block groups, inode tables, etc.), not file contents, making it much smaller than a full backup. This allows filesystem experts to diagnose problems without access to the actual data or the need to copy entire filesystems.

参数

-I
Restore metadata from image to device
-r
Create raw sparse image (metadata at proper offsets)
-Q
Create QCOW2 format image
-a
Include all data (not just metadata)
-f
Force operation even if the filesystem is mounted (result may be unreliable)
-s
Scramble directory entries and zero unused directory block portions
-o _src_offset_
Offset in bytes where the filesystem starts on the source device
-O _dest_offset_
Offset to seek to in the destination before writing
-b _blocksize_
Set filesystem blocksize in bytes (normally auto-detected)
-p
Compare blocks before writing; skip identical blocks (useful for flash storage)

FAQ

What is the e2image command used for?

e2image saves critical ext2/ext3/ext4 filesystem metadata to a file. This is useful for backing up filesystem structure for disaster recovery or debugging filesystem corruption issues. The image file contains only metadata (superblock, block groups, inode tables, etc.), not file contents, making it much smaller than a full backup. This allows filesystem experts to diagnose problems without access to the actual data or the need to copy entire filesystems.

How do I run a basic e2image example?

Run `e2image [/dev/sdXN] [path/to/image_file]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -I do in e2image?

Restore metadata from image to device