ddrescue reverse resume not working

tunnu83

New member
Hello,

This is my second ddrescue run after the successful first run which I had to resume couple of times. In the second run I am using the -R (Reverse) option but surprisingly it is not resuming from where it was interrupted. It is starting from the beginning (I mean starting from the back of the disk). Anyone faced this issue before ?

Please help.
 

Jared

Administrator
Staff member
Did you use the same log file as before? That log is how it keeps track of what is and isn't read.
 

tunnu83

New member
Did you use the same log file as before? That log is how it keeps track of what is and isn't read.
ddrescue -d -n -vv /dev/sdc1 /media/sda2/test.img /media/sda2/test.log (First run)
ddrescue -d -n -vv -R /dev/sdc1 /media/sda2/test.img /media/sda2/test.log (Second run)

So silly of me to not post the whole command!!
Yes am sure I've used the same log file.
 

Jared

Administrator
Staff member
Maybe I'm just misunderstanding your original query then. Adding the -R trigger will make it restart from the end and work backward, regardless of where it had last attempted in prior runs. It's just still only going to actually re-read sectors that weren't previously read based on the logging.
 

tunnu83

New member
ddrescue -d -n -vv -R /dev/sdc1 /media/sda2/test.img /media/sda2/test.log (Second run)

Sorry what I mean is I had to stop the above command mid-way due to some work by pressing Ctrl + C. Lets suppose at that time the ipos was 102400 MB. When I passed the same command again it started again from 500000 MB instead of 102400 MB. It should continue from 102400 MB right ?
 

Jared

Administrator
Staff member
No, if you switch directions it will restart from the end and work backwards.

The most common use of the reverse trigger is to image up to a bad area, then image backwards to the same area without stressing the drive trying to image through a really bad spot.

It's working as intended, but you can manually specify the starting area if you only want to reverse image from that area.
 

tunnu83

New member
It's working as intended, but you can manually specify the starting area if you only want to reverse image from that area.
But if I cancel the imaging operation midway and then pass the same command again isn't it suppose to automatically start from where it left off ? It worked successfully during the first run:
ddrescue -d -n -vv /dev/sdc1 /media/sda2/test.img /media/sda2/test.log (First run)

But its not resuming from where it left off during the second run:
ddrescue -d -n -vv -R /dev/sdc1 /media/sda2/test.img /media/sda2/test.log (Second run)

What do you think the reason can be ?
 

Jared

Administrator
Staff member
If you resume going the SAME direction it'll pick up where it left off. If you REVERSE the direction, it's starting at the opposite end of the LBA range and therefore will not resume. It's doing what it was programmed to do.
 
Top