E2IMAGE(8) | System Manager's Manual | E2IMAGE(8) |
NAME
e2image - Save critical ext2/ext3/ext4 filesystem metadata to a fileSYNOPSIS
e2image [ -r|Q ] [ -fr ] device image-fileDESCRIPTION
The e2image program will save critical ext2, ext3, or ext4 filesystem metadata located on device to a file specified by image-file. The image file may be examined by dumpe2fs and debugfs, by using the -i option to those programs. This can assist an expert in recovering catastrophically corrupted filesystems. In the future, e2fsck will be enhanced to be able to use the image file to help recover a badly damaged filesystem.RESTORING FILESYSTEM METADATA USING AN IMAGE FILE
The -I option will cause e2image to install the metadata stored in the image file back to the device. It can be used to restore the filesystem metadata back to the device in emergency situations.RAW IMAGE FILES
The -r option will create a raw image file instead of a normal image file. A raw image file differs from a normal image file in two ways. First, the filesystem metadata is placed in the proper position so that e2fsck, dumpe2fs, debugfs, etc. can be run directly on the raw image file. In order to minimize the amount of disk space consumed by a raw image file, the file is created as a sparse file. (Beware of copying or compressing/decompressing this file with utilities that don't understand how to create sparse files; the file will become as large as the filesystem itself!) Secondly, the raw image file also includes indirect blocks and directory blocks, which the standard image file does not have, although this may change in the future.QCOW2 IMAGE FILES
The -Q option will create a QCOW2 image file instead of a normal, or raw image file. A QCOW2 image contains all the information the raw image does, however unlike the raw image it is not sparse. The QCOW2 image minimize the amount of disk space by storing data in special format with pack data closely together, hence avoiding holes while still minimizing size.INCLUDING DATA
Normally e2image only includes fs metadata, not regular file data. The -a option can be specified to include all data. This will give an image that is suitable to use to clone the entire FS or for backup purposes. Note that this option only works with the raw or QCOW2 formats. The -p switch may be given to show progress. If the file system is being cloned to a flash-based storage device (where reads are very fast and where it is desirable to avoid unnecessary writes to reduce write wear on the device), the -c option which cause e2image to try reading a block from the destination to see if it is identical to the block which e2image is about to copy. If the block is already the same, the write can be skipped. The -n option will cause all of the writes to be no-ops, and print the blocks that would have been written.OFFSETS
Normally a filesystem starts at the beginning of a partition, and e2image is run on the partition. When working with image files, you don't have the option of using the partition device, so you can specify the offset where the filesystem starts directly with the -o option. Similarly the -O option specifies the offset that should be seeked to in the destination before writing the filesystem.AUTHOR
e2image was written by Theodore Ts'o (tytso@mit.edu).AVAILABILITY
e2image is part of the e2fsprogs package and is available from http://e2fsprogs.sourceforge.net.SEE ALSO
dumpe2fs(8), debugfs(8)May 2015 | E2fsprogs version 1.42.13 |