Testdisk timeout to move on to next file and resume restore? Topic is solved

Using TestDisk to undelete files
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
Bueberry57
Posts: 3
Joined: 18 Feb 2024, 09:57

Testdisk timeout to move on to next file and resume restore?

#1 Post by Bueberry57 »

Hello,

I'm trying to restore files with testdisk, but I'm facing 2 operational problems :

- Sometimes, the restore process (Copying, please wait... 9562 ok, 0 failed) freezes for several seconds as if the drive wouldn't let Testdisk access the file (bad sector?). If I click "Enter", it stops trying for this file and moves on to the next file. Is it possible to set an amount of time after which Testdisk would abandon the read attempt for this file and moves on to the next one automatically? I'd rather have Testdisk failing to restore a few files but succeeding in restoring most of them quicker.

- Sometimes, Testdisk restore job stops as it's failing to read files I believe. At that moment the drive disconnects and reconnects by itself (I'm using a USB adapter). Not sure if the job fails because of the drive disconnecting or if the drive disconnects and reconnects on some Testdisk action at the end of the (failing) process.
Starting the restore job again over the same directory tree, is there a way to have Testdisk skip the files that where restored (file exists at the destination) during the previous run?

Thank you for any help :-)

Blue.

recuperation
Posts: 2737
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Testdisk timeout to move on to next file and resume restore?

#2 Post by recuperation »

TestDisk is not built to deal with defective disks containing unreadable sectors. Use ddrescue as described in the manual and run TestDisk against the clone.
As for your possible interface problems your case description is not sufficient.

Bueberry57
Posts: 3
Joined: 18 Feb 2024, 09:57

Re: Testdisk timeout to move on to next file and resume restore?

#3 Post by Bueberry57 »

Thank you for your advise.

Regarding dd_rescue unfortunately I don't have a bigger disk right now to save the image to.

Regarding Testdisk not able to read a file, since I can have Testdisk skipping the file by pressing the Enter key (Stop), coulnd't testdisk to this by itslef after a certain reading timeout?
Could that be possible ?

recuperation
Posts: 2737
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Testdisk timeout to move on to next file and resume restore?

#4 Post by recuperation »

Bueberry57 wrote: 18 Feb 2024, 11:55 Thank you for your advise.

Regarding dd_rescue unfortunately I don't have a bigger disk right now to save the image to.
If you do not clone the disk into a file but clone your disk directly into another disk the target does not have to bigger than the source.

Regarding Testdisk not able to read a file, since I can have Testdisk skipping the file by pressing the Enter key (Stop), coulnd't testdisk to this by itslef after a certain reading timeout?
Could that be possible ?
Of course! TestDisk is open source. Just download the source code and modify it to make it fit to your personal intended workflow.

All other users just go with the recommended procedure that minimizes exterting stress onto a probably broken disk/interface.

Bueberry57
Posts: 3
Joined: 18 Feb 2024, 09:57

Re: Testdisk timeout to move on to next file and resume restore?

#5 Post by Bueberry57 »

Cool. Thank you for providing quick help.

Locked