LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   data recovery (https://www.linuxquestions.org/questions/linux-general-1/data-recovery-270901/)

yjiang 12-27-2004 03:43 PM

data recovery
 
Hi,
I tried to back up my home directory to a new SATA HD using dd command:
dd if=/dev/hda2 of=/mnt/aSATAdrive/home_back
the image size is roughly the same as my home partition. however, when i tried to restore the image file by dd if=/mnt/aSTAdrive/home_back of=/dev/sda5
if worked. when I browsed the files, for most files i got a error: input/output error.
any ideas ?
thank you in advance.
yong

jailbait 12-27-2004 06:28 PM

" any ideas ?"

When you use dd to copy data to a hard drive which has a different geometry than the original you often end up with problems. I recommend that you forget dd and use the tar command to backup and restore your home directory.

-------------------------
Steve Stites

yjiang 12-27-2004 06:33 PM

any suggestion to restore it ?
 
you are right, however i already did it, and i need a workaround to recover the data.

Mara 12-28-2004 04:23 PM

Moved: This thread is more suitable in Linux-General and has been moved accordingly to help your thread/question get the exposure it deserves.

You should be able to mount the image. Try
mount -t ext2/ext3/reiserfs /mnt/aSATAdrive/home_back /mnt/somewhere -o loop
Choose the right partition type and fill directories. You'd also need to be root to do this.

yjiang 12-28-2004 05:19 PM

yes, I can mount
 
Yes, I can mount the image, however, i missed most data in the mounted image, does that mean i lost them forever ?
thank you anyway.

Mara 12-30-2004 03:51 PM

If you have created the full image, the data should be accessible. If it's not it means something got wrong. What do you mean by 'i missed most data in the mounted image'? There are no such files or there are files by empty etc?

yjiang 12-30-2004 05:37 PM

image data
 
well, when i mount the image, some of the directory can be accessed, some of them can not ( i got input/output error).
i suspect that the image is not intact, is that right ?

jailbait 12-30-2004 07:58 PM

"well, when i mount the image, some of the directory can be accessed, some of them can not ( i got input/output error).
i suspect that the image is not intact, is that right ?"

Yes, the image is probably not intact. The next thing to do is to use the tar command to back up as much of the image as you can so that you won't lose that data when you try to fix things.

------------------------
Steve Stites


All times are GMT -5. The time now is 08:59 PM.