I'm using the foremost,photorec and other tools for recovering data.
What is the best way for cloning the USD or HDD for recovery files?
- Which one should I use
ddorcatorddrescue? - If you recommended to use
dd, then how should I use it for carving? - Try recovery files of image cloned, is equivalent to try recovery directly to the device?
ddrescue, particularly if you suspect that there are bad sectors (physical damage). See this link and links from it: 'Repair the partition table and file system of a pendrive', https://ubuntuforums.org/showthread.php?t=2196858&p=13409986#post13409986 , browse to the paragraph ' Advanced repair of a partition table, file system and/or recovery of files' – sudodus Jan 26 '17 at 20:28ddis the bare minimum, butddrescueordcflddare definitely better) then start working on data extraction. – Andrea Lazzarotto Jan 27 '17 at 16:35ddrescuefor this cloning task. And then you can use various tools on the cloned copy in order to recover files, for example testdisk to recover the partition structure and file system, and if it fails, photorec, that can recover files without any file system. See the link in my first comment and also the following links, https://askubuntu.com/questions/870462/i-unplugged-an-sd-card-without-clicking-eject-and-now-everything-is-read-only/870555#870555 , https://askubuntu.com/questions/862224/how-can-i-get-back-the-data-of-my-usb-on-ubuntu-16-04-1-lts/862227#862227 – sudodus Jan 27 '17 at 19:34ddunder the hood, but if you check and double-check, it should work well withddrescue. You can ask here, if the command line you intend to use is good or bad, and wait for a reply before you use it. – sudodus Jan 27 '17 at 19:46