Page 1 of 1

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

Posted: 18 Feb 2024, 10:57
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.

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

Posted: 18 Feb 2024, 11:41
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.

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

Posted: 18 Feb 2024, 11:55
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 ?

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

Posted: 18 Feb 2024, 12:04
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.

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

Posted: 18 Feb 2024, 12:15
by Bueberry57
Cool. Thank you for providing quick help.