File recovery

From ArchWiki
Revision as of 17:44, 12 July 2009 by Graysky (talk | contribs)
Jump to: navigation, search


Page Overview

This article is meant to capture several file recovery or undelete options for Arch/Linux. Please contribute to this page using the general format below and keeping it brief.

Special Note Regarding Backups

As an alternative to working with a 'live' partition (mounted or not), it is preferable to work with an image provided the filesystem in question isn't too large (flash memory for example).

To make an image, one can use dd as follows:

# dd if=/dev/target_partition of=/home/user/partition.image



Foremost is a console program to recover files based on their headers, footers, and internal data structures. This process is commonly referred to as data carving. Foremost can work on image files, such as those generated by dd, Safeback, Encase, etc, or directly on a drive. The headers and footers can be specified by a configuration file or you can use command line switches to specify built-in file types. These built-in types look at the data structures of a given file format allowing for a more reliable and faster recovery.


Foremost is available from the [AUR] in [this page].

External Links

Testdisk and Photorec


TestDisk and Photorec are both open-source data recovery utilities licensed under the terms of the [GNU Public License] (GPL). I haven't used TestDisk, but I have used Photorec to recover several photos accidentally deleted from my digital camera (FAT32 formated SD Card).


Both TestDisk and Photorec are available for Arch i686 and x64_86.

# pacman -S testdisk  

External Links