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