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