• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

e2image Command Examples in Linux

by Deepika

The e2image command in Linux is used to create an image of an ext2, ext3, or ext4 file system. This image can be used for backup or recovery purposes. The command creates a file that contains a copy of the file system’s data, which can be restored to a disk or partition using the e2image command.

e2image Command Examples

1. Write metadata located on device to a specific file:

# e2image /dev/sdXN path/to/image_file

2. Print metadata located on device to stdout:

# e2image /dev/sdXN -

3. Restore the filesystem metadata back to the device:

# e2image -I /dev/sdXN path/to/image_file

4. Create a large raw sparse file with metadata at proper offsets:

# e2image -r /dev/sdXN path/to/image_file

5. Create a QCOW2 image file instead of a normal or raw image file:

# e2image -Q /dev/sdXN path/to/image_file

Filed Under: Linux

Some more articles you might also be interested in …

  1. CentOS / RHEL : Resize (extend) non-root EXT3/4 filesystem on non-LVM device (hard disk partition)
  2. How to run “find” command on current directory only and not on sub-directories
  3. extrace Command Examples in Linux
  4. arecord: command not found
  5. exif Command Examples in Linux
  6. debchange: command not found
  7. How to extract RAR files in CentOS/RHEL 7 and 8
  8. hwclock: command not found
  9. IBM DB2 Installation on Red Hat Enterprise Linux
  10. CentOS / RHEL : iptables troubleshooting guide

You May Also Like

Primary Sidebar

Recent Posts

  • fprintd-delete Command Examples in Linux
  • fprintd-delete: command not found
  • foreman: command not found
  • foreman Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright