]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blame - misc/e2image.8.in
Add support for raw image files in e2image.
[thirdparty/e2fsprogs.git] / misc / e2image.8.in
CommitLineData
348e43dc
TT
1.\" -*- nroff -*-
2.\" Copyright 2001 by Theodore Ts'o. All Rights Reserved.
3.\" This file may be copied under the terms of the GNU Public License.
4.\"
5.TH E2IMAGE 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
6.SH NAME
7e2image \- Save critical ext2 filesystem data to a file
8.SH SYNOPSIS
9.B e2image
6304baf2
TT
10[
11.B \-r
12]
348e43dc
TT
13.I device
14.I image-file
15.SH DESCRIPTION
0edb4d85 16The
348e43dc 17.B e2image
0edb4d85 18program will save critical filesystem data on the ext2 filesystem located on
348e43dc 19display or change the filesystem label on the ext2 filesystem located on
0edb4d85
TT
20.I device
21to a file specified by
22.IR image-file .
23The image file may be examined by
24.B dumpe2fs
25and
26.BR debugfs ,
27by using the
28.B \-i
29option to those programs. This can be used by an expert in assisting
30the recovery of catastrophically corrupted filesystems. In the future,
31e2fsck will be enhanced to be able to use the image file to help
32recover a badly damaged filesystem.
33.PP
6304baf2
TT
34The
35.B \-r
36option will create a raw image file instead. A raw image file differs
37from a normal image file in two ways. First, the filesystem metadata is
38placed in the proper position so that e2fsck, dumpe2fs, debugfs,
39etc. can be run directly on the raw image file. In order to minimize
40the amount of disk space consumed by a raw image file, the file is
41created as a sparse file. (Beware of copying or
42compressing/decompressing this file with utilities that don't understand
43how to create sparse files; the file will become as large as the
44filesystem itself!) Secondly, the raw image file also includes indirect
45blocks and data blocks, which the current image file does not have ---
46although this may change in the future.
47.PP
0edb4d85
TT
48It is a very good idea to periodically (at boot time and
49every week or so) to create image files for all of
50filesystems on a system, as well as saving the partition
51layout (which can be generated using the using
52.B fdisk -l
53command). Ideally the image file should be stored on some filesystem
54other that
55the filesystem whose data it contains, to ensure that its data is
56accessible in the case where the filesystem has been badly damaged.
57.PP
58To save disk space,
59.B e2image
60creates the image file as a sparse file.
61Hence, if the image file
62needs to be copied to another location, it should
63either be compressed first or copied using the
64.B \--sparse=always
65option to GNU version of
66.BR cp .
67.PP
68The size of an ext2 image file depends primarily on the size of the
69filesystems and how many inodes are in use. For a typical 10 gigabyte
70filesystem, with 200,000 inodes in use out of 1.2 million inodes, the
71image file be approximately 35 megabytes; a 4 gigabyte filesystem with
7215,000 inodes in use out of 550,000 inodes will result in a 3 megabyte
73image file. Image files tend to be quite
6304baf2 74compressible; an image file taking up 32 megabytes of space on
0edb4d85 75disk will generally compress down to 3 or 4 megabytes.
348e43dc
TT
76.PP
77.SH AUTHOR
0edb4d85 78.B e2image
348e43dc
TT
79was written by Theodore Ts'o (tytso@mit.edu).
80.SH AVAILABILITY
81.B e2image
82is part of the e2fsprogs package and is available from anonymous
83http://e2fsprogs.sourceforge.net.
84.SH SEE ALSO
85.BR dumpe2fs (8),
86.BR debugfs (8)
87