Restore Individual Files from Disk Image
In this article
Yes, you can restore individual files from a disk image without restoring the entire image. You mount the image as a virtual drive, browse its contents, and copy out the files you need—no full-system restore required.
What a Disk Image Actually Is
A disk image is a single file that contains an exact, sector-by-sector copy of a storage device. Common formats include ISO (optical discs), IMG (raw disk images), VHD/VHDX (virtual hard disks), and DMG (macOS disk images). Unlike a simple folder of files, a disk image preserves the filesystem structure, boot sectors, permissions, and even deleted file remnants. This makes it ideal for backups, forensic analysis, and virtual machines, but it also means you cannot simply double-click and edit it like a regular folder.
When you create a disk image, you are essentially taking a photograph of the entire drive at a moment in time. Tools like dd on Linux, Disk Utility on macOS, or Win32 Disk Imager on Windows produce these raw dumps. Other tools like Clonezilla create compressed images that still contain the full filesystem structure. The key point is that the image is a container, and the files inside are only accessible if you know how to open that container.
How to Mount a Disk Image and Copy Files
The simplest method is to mount the image as a virtual drive. The operating system then treats it like a physical disk, and you can browse it in File Explorer, Finder, or a file manager.
- Windows: Right-click the
.isofile and select Mount. For.imgor.vhdfiles, right-click and choose Mount or use Disk Management to attach the VHD. If the image is in a format Windows cannot natively mount (like.dmg), you will need third-party software such as 7-Zip or OSFMount. - macOS: Double-click a
.dmgor.isofile to mount it. For raw.imgfiles, use the Disk Utility app: go to File > Open Image and select the file. The mounted volume appears on the desktop or in Finder’s sidebar. - Linux: Use the
mountcommand. For an ISO:sudo mount -o loop image.iso /mnt/point. For a raw image containing a filesystem, you may need to specify the offset or usekpartxto map partitions.
Once mounted, simply copy the files you want to your local drive. After you are done, unmount the image to release the virtual drive.
When Mounting Does Not Work
Mounting fails when the image format is not natively supported or when the image is corrupted. For example, Windows cannot mount a .dmg file, and macOS cannot mount a .vhd without extra software. Another common issue is a partition table: a raw disk image might contain multiple partitions, and the mount command may only see the whole disk, not the partitions inside.
In these cases, use a dedicated tool that can parse the image structure without mounting it. 7-Zip on Windows can open many image formats (ISO, VHD, DMG) as archives, letting you extract files directly. PowerISO and Daemon Tools are commercial options that handle a wider range of formats. On Linux, 7z can also extract from ISO and VHD files, and qemu-nbd can connect a raw image as a network block device, allowing you to mount partitions individually.
If the image is from a failed or dying drive, mounting may hang or show errors. In that case, use a recovery tool that reads the image in a read-only, error-tolerant manner, such as PhotoRec or TestDisk, which can carve out files even from damaged images.
Extracting Files Without Mounting (Forensic Approach)
For forensic or deep-recovery scenarios, you often want to avoid mounting because it can alter timestamps or trigger write operations. Instead, you can use command-line tools that read the image directly.
- Linux:
icatfrom The Sleuth Kit can output a single file from an image based on its inode number.flslists files and their inode numbers. This works on raw images and many filesystem types. - Windows: Arsenal Image Mounter mounts images as physical disks without writing to them, and then you can use any file recovery tool.
- Cross-platform: libewf tools handle E01 (Expert Witness) images, which are common in forensics. You can use
ewfmountto present the image as a raw device, then mount that device.
These methods are more technical but give you precise control and do not require a full graphical interface. They are especially useful when the image is large and you only need a few specific files.
Common Mistakes and Pitfalls
One frequent mistake is trying to open a disk image with a text editor or a program that does not understand container formats. A disk image is not a document; it is a block-level copy. Another mistake is forgetting to unmount the image before disconnecting or deleting it, which can cause data corruption or errors on the virtual drive.
Also, be aware of the difference between a logical image (which contains only files and folders) and a physical image (which includes the partition table and boot sectors). If you have a physical image, you may need to identify the partition offset before you can access the files. Tools like fdisk -l or parted can show you the partition layout.
A common misconception is that you must restore the entire image to a drive to get any files back. That is false. Mounting or extracting is non-destructive and does not touch the original image. You can safely copy individual files without affecting the image itself.
Comparing Mount vs. Extract vs. Restore
There are three distinct operations, and choosing the right one depends on your goal:
- Mount: Temporarily attaches the image as a virtual drive. Best for quick access to files, viewing contents, or running a program from the image. Changes are not written back unless you use a read-write mount, which is rare.
- Extract: Copies files out of the image to another location. This is what you do when you use 7-Zip or a forensic tool. It is permanent and does not alter the image.
- Restore: Writes the entire image back to a physical drive, overwriting its current contents. This is only needed when you want to boot from the image or replace a failed drive. It is destructive to the target drive.
For most individual-file recovery, extract is the safest and fastest method. It does not require a spare drive of equal size and does not risk overwriting anything.
Cost and Tool Options
There are free and paid tools, but you do not need to spend money for basic file extraction. Native OS tools handle ISO and VHD on Windows, and DMG on macOS. For other formats, free tools like 7-Zip, OSFMount, and The Sleuth Kit are sufficient. Commercial tools like PowerISO or AnyToISO offer more convenience and support for exotic formats, but they are not necessary for the average user.
If you are dealing with a compressed or encrypted image, you may need the original software that created it. For example, a .tib file from Acronis True Image requires Acronis software to mount or extract. Similarly, encrypted DMG files require the password and macOS’s built-in support.
Frequently Asked Questions
Can I restore a single file from a full system backup image?
Yes, if the backup software supports browsing the image. Tools like Acronis, Macrium Reflect, and Windows Backup allow you to mount the image and copy individual files. If not, you can use a third-party tool that can read the backup format.
What if the disk image is corrupted?
Try mounting it in read-only mode first. If that fails, use a recovery tool like PhotoRec that scans the raw data for file signatures. It may recover files even if the filesystem is damaged, but filenames may be lost.
Does mounting a disk image write anything to the original image?
No, mounting is read-only by default. The image file itself is not modified. You can safely mount and unmount it as many times as you like.
Why can’t I see my files after mounting a raw IMG file?
Raw IMG files may contain multiple partitions. You need to mount the specific partition, not the whole disk. Use fdisk -l to find partition offsets and mount with the offset option, or use a tool like OSFMount that can detect partitions automatically.
Is it possible to extract files from a disk image on a different operating system than the one that created it?
Yes, as long as the tool you use supports the filesystem inside the image. For example, a Windows NTFS image can be mounted on Linux with ntfs-3g, and a macOS HFS+ image can be read on Windows with third-party tools. The image format is separate from the filesystem format.