I had some data in my external hard drive (eHD), and performed a dd to backup my ubuntu filesystem onto the eHD.

I thought it would maintain the data that was previously there, plus the backup.

What i got:

I can only see the filesystem which i backed-up, and no signal of my previous data. However, when I see the portion of the eHD occupied, it shows as if the files are still there, that is, 500 Gb of my old data, plus my filesystem which is 300 Gb. So in total I have 800 Gb of a 1 Tb disk occupied, so I'm guessing the data is somewhere, I just can't see it.

Any ideas on how to recover the data?

  • 2
    never, ever, EVER, run a dd command unless you know exactly what it's about to do. – Rob Sep 29 '11 at 17:09
  • I guess I understand why now. The fact that the disk occupied size shows as if it has the previous and the more recent backed-up files gives me some hope on their recovery. I'll try woliveirajr suggestions, hopefully they will work. – random Sep 29 '11 at 17:25
  • Do you know if it was 500GB on there before or 800GB before? Also, do you know the old format it was in? DD really isn't the best tool for making backups, rsync would work better. In the past, I've just copied and pasted partitions with gparted (which leads to identical UUIDs, but that can be fixed.) – Rob Sep 29 '11 at 18:38
  • I had 500 Gb in my eHD, after doing the dd I ended up with the a total of 800 Gb. Now I can only see these newer 300 Gb. The format was NTFS. – random Sep 29 '11 at 18:44
  • Have you looked at with gparted? What does it show? – Rob Sep 29 '11 at 18:53

That data is most likely nuked as you've overwritten it with the backup you performed. DD is a low-level copy facility; i.e it copies drives sector-by-sector. Any sectors it overwrote aren't coming back unless you get some forensic data recovery people in (and even then I doubt you'd get anything from it). Cut your losses as move on.

Is there anything that you absolutely NEED from that drive, though? You might want to try some of the drive recovery stuff in SystemRescueCD as a last-ditch attempt to get at it, but there's no guarantees at all. (You'll probably want to use something like test-disk, but as I haven't had to do it for a while (thank god) it might be worth waiting for some else to suggest something.)

  • I can live without it, but there is work data I would like to recover. The fact that the disk usage shows what I backed-up plus another 500 Gb gave me some hope of recovering it. – random Sep 29 '11 at 17:21
  • What DD command did you use to do the backup? If by some miracle it preserved disk geometry (which it kind of sounds like it did), you have a good chance of getting it back. – duck. Sep 29 '11 at 22:31
  • dd if=/dev/sda1 of=/dev/sdc1 – random Sep 29 '11 at 23:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.