DDRescue - How to resume from logfile

Reaper1242

Well-Known Member
Joined
Jan 1, 2009
Messages
455
Reaction score
45
I'm very rusty on the Linux side of things so can anyone familiar with DDRescue help me out.

I started a rescue using
Code:
ddrescue -r3 -n -S -v /dev/sdc /dev/sdb recovery.log
. What with all the loadshedding I probably need to resume at some point so can someone give me the command line to resume form the logfile.
Thanks
 
You just use the exact same command and it will carry on from where it got interrupted. You're lucky you specified a log file, without it you would have had to start from scratch.

ddrescue is the dogs bollocks, probably the best free imaging/data recovery util out there.
 
You just use the exact same command and it will carry on from where it got interrupted. You're lucky you specified a log file, without it you would have had to start from scratch.

ddrescue is the dogs bollocks, probably the best free imaging/data recovery util out there.

Thanks for the reply. I thought that was the case, just wanted to confirm before I did something silly. I've used Clonezilla successfully in the past but that was on smaller drives and without power outages. Very happy to have discovered DDRescue.

Seems excellent so far. Of course we'll see what we end up with at the end of a 3TB clone. Whenever that is LOL
 
I seem to have run into a small problem. When trying to continue I used the same command and it returned the message that the output file existed and was not a regular file. I understand that it's a secdurity feature to ensure you don't accidentaly erase but surely using --force would erase everything and start over???
 
I seem to have run into a small problem. When trying to continue I used the same command and it returned the message that the output file existed and was not a regular file.
I think it is referring to /dev/sdb not recovery.log here.

Is the -S option (use sparse writes for output file) compatible with using a device (/dev/sdb) as the output? It doesn't make sense to me.
 
I think it is referring to /dev/sdb not recovery.log here.

Is the -S option (use sparse writes for output file) compatible with using a device (/dev/sdb) as the output? It doesn't make sense to me.

Ignore the -S. I didn't use it. No idea why I added it into the OP.

I had only done a couple of hours on the operation so tried the --force and it starts from scratch. Unless I'm doing something wrong.
 
Can you see recovery.log in your current directory?
How big is the file?
 
Can you see recovery.log in your current directory?
How big is the file?

Nope, not seeing it. Looks like it's not actually writing a log file.

Okm let's try this. I'm booting into SystemRescueCD from a flash drive to clone a 3TB drive to a 4TB drive. Maybe someone can give me the usage to accomplish that.
 
How did you do it, from a livecd? If you use(d) a livecd you need to specify a valid path for the log file as you cannot write it to the livecd for obvious reasons.

Is there something wrong with the 3TB drive that requires you using ddrescue?

Code:
sudo ddrescue -n -v /dev/sd[B]x[/B] /dev/sd[B]y[/B] /path/to/logfile

Is the syntax you want to use where x=source drive & y=destination drive. You can idendify which is which by using sudo fdisk -l command. From a livecd you will have to mount another drive/partition or usb flash stick to write the log file to.

I find it easier to do all this from an installed linux system, I have a small external drive with Kali on it should I need portable usage.
 
Last edited:
How did you do it, from a livecd? If you use(d) a livecd you need to specify a valid path for the log file as you cannot write it to the livecd for obvious reasons.

Is there something wrong with the 3TB drive that requires you using ddrescue?

Code:
sudo ddrescue -n -v /dev/sd[B]x[/B] /dev/sd[B]y[/B] /path/to/logfile

Is the syntax you want to use where x=source drive & y=destination drive. You can idendify which is which by using sudo fdisk -l command. From a livecd you will have to mount another drive/partition or usb flash stick to write the log file to.

I find it easier to do all this from an installed linux system, I have a small external drive with Kali on it should I need portable usage.

Yup, I'm booting from a livecd, well liveusb.

Something on the drive is failing. If I use it in Windows it works for a while then just disconnects and sometimes comes back after a while. Also can't copy from it at all. Thoug the files are readable while connected. I suspect the board on the drive is giving up.

Damn, I really have forgotten a lot of this stuff. Thanks for the help, that's definitely where Iwent wrong.
 
Ok so just so I get this right now. I don't have a spare drive at the moment so I have to mount another flash drive.

So if I've got this right I'll need the source and target drive, the live USB and the USB for the logfile? Can you refresh my memory on how to mount the USB for the logfile?
 
Last edited:
So if I've got this right I'll need the source and target drive, the live USB and the USB for the logfile? Can you refresh my memory on how to mount the USB for the logfile?
Use dmesg after plugging in the flash drive to see which device it was assigned (e.g. /dev/sdc, /dev/sdd, etc.).

Assuming nothing else is mounted at /mnt (use mount to check) and assuming your flash drive has no partition table:
Code:
sudo mount /dev/sdc /mnt

You can make the path to your log file /mnt/recovery.log

When you are done:
Code:
sudo umount /mnt

If your flash drive has a partition table, the device to mount will be (for example) /dev/sdc1 instead of /dev/sdc.
 
Last edited:
Thanks everyone for their patience and help.

It's from a Seagate Desktop Expansion which in the 3TB I believe is a Baracuda.
 
It's from a Seagate Desktop Expansion which in the 3TB I believe is a Baracuda.

Was watching tek syndicate earlier today and it seems those 3TB seagates are problematic (not sure of the exact model), backblaze are retiring over 4000 3tb seagates as they've experienced failure rates around 34%
 
Last edited:
I have a server with 5 x Seagate 3TB drives and found out on Friday during load shedding that at least two of them have developed problems and fallen out of their RAID array. :eek:
 
And everyone really helped. Took the whole lot to the girlfriend's place since she's under City Power so rarely gets shed but it's now running great.

I've decided to resurrect an old desktop system and run it as a Linux system.

As far as the drive goes I must have been lucky because it lasted over 5 years before failing.
 
Top
Sign up to the MyBroadband newsletter
X