Theodore Ts'o | 348e43d | 2001-05-03 14:43:43 +0000 | [diff] [blame] | 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 |
| 10 | .I device |
| 11 | .I image-file |
| 12 | .SH DESCRIPTION |
Theodore Ts'o | 0edb4d8 | 2001-05-03 16:30:48 +0000 | [diff] [blame^] | 13 | The |
Theodore Ts'o | 348e43d | 2001-05-03 14:43:43 +0000 | [diff] [blame] | 14 | .B e2image |
Theodore Ts'o | 0edb4d8 | 2001-05-03 16:30:48 +0000 | [diff] [blame^] | 15 | program will save critical filesystem data on the ext2 filesystem located on |
Theodore Ts'o | 348e43d | 2001-05-03 14:43:43 +0000 | [diff] [blame] | 16 | display or change the filesystem label on the ext2 filesystem located on |
Theodore Ts'o | 0edb4d8 | 2001-05-03 16:30:48 +0000 | [diff] [blame^] | 17 | .I device |
| 18 | to a file specified by |
| 19 | .IR image-file . |
| 20 | The image file may be examined by |
| 21 | .B dumpe2fs |
| 22 | and |
| 23 | .BR debugfs , |
| 24 | by using the |
| 25 | .B \-i |
| 26 | option to those programs. This can be used by an expert in assisting |
| 27 | the recovery of catastrophically corrupted filesystems. In the future, |
| 28 | e2fsck will be enhanced to be able to use the image file to help |
| 29 | recover a badly damaged filesystem. |
| 30 | .PP |
| 31 | It is a very good idea to periodically (at boot time and |
| 32 | every week or so) to create image files for all of |
| 33 | filesystems on a system, as well as saving the partition |
| 34 | layout (which can be generated using the using |
| 35 | .B fdisk -l |
| 36 | command). Ideally the image file should be stored on some filesystem |
| 37 | other that |
| 38 | the filesystem whose data it contains, to ensure that its data is |
| 39 | accessible in the case where the filesystem has been badly damaged. |
| 40 | .PP |
| 41 | To save disk space, |
| 42 | .B e2image |
| 43 | creates the image file as a sparse file. |
| 44 | Hence, if the image file |
| 45 | needs to be copied to another location, it should |
| 46 | either be compressed first or copied using the |
| 47 | .B \--sparse=always |
| 48 | option to GNU version of |
| 49 | .BR cp . |
| 50 | .PP |
| 51 | The size of an ext2 image file depends primarily on the size of the |
| 52 | filesystems and how many inodes are in use. For a typical 10 gigabyte |
| 53 | filesystem, with 200,000 inodes in use out of 1.2 million inodes, the |
| 54 | image file be approximately 35 megabytes; a 4 gigabyte filesystem with |
| 55 | 15,000 inodes in use out of 550,000 inodes will result in a 3 megabyte |
| 56 | image file. Image files tend to be quite |
| 57 | compressible; a sparse image file taking up 32 megabytes of space on |
| 58 | disk will generally compress down to 3 or 4 megabytes. |
Theodore Ts'o | 348e43d | 2001-05-03 14:43:43 +0000 | [diff] [blame] | 59 | .PP |
| 60 | .SH AUTHOR |
Theodore Ts'o | 0edb4d8 | 2001-05-03 16:30:48 +0000 | [diff] [blame^] | 61 | .B e2image |
Theodore Ts'o | 348e43d | 2001-05-03 14:43:43 +0000 | [diff] [blame] | 62 | was written by Theodore Ts'o (tytso@mit.edu). |
| 63 | .SH AVAILABILITY |
| 64 | .B e2image |
| 65 | is part of the e2fsprogs package and is available from anonymous |
| 66 | http://e2fsprogs.sourceforge.net. |
| 67 | .SH SEE ALSO |
| 68 | .BR dumpe2fs (8), |
| 69 | .BR debugfs (8) |
| 70 | |