LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Hard Disk Failure: How do I move data to a new hard disk drive? (http://www.linuxquestions.org/questions/linux-software-2/hard-disk-failure-how-do-i-move-data-to-a-new-hard-disk-drive-680333/)

spyros 10-31-2008 02:16 PM

Hard Disk Failure: How do I move data to a new hard disk drive?
 
Hi All,


I have three hard disk drives on my debian system but one of my hard disk drives has gone faulty!

this is my fstab:

]proc /proc proc defaults 0 0
/dev/hdc1 / ext3 defaults,errors=remount-ro 0 1
/dev/hdc2 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
/dev/hdd /media/server ext3 rw,user,auto,exec 0 0
/dev/sda /media/backup ext3 rw,user,auto,exec 0 0


Unfortunately it is the HD drive on which lie the / and swap file system i.e my debian OS.

What I would like to ask you is this:

Is there any way I can move my data on a new hard disk drive and have a working system as I did before or do I have to reinstall my OS from scratch as well as all my applications? Can I do a hard copy or take an image and install on a new probably larger in size disk, or even a sata drive?

I would like to avoid reinstalling everything, from DNS to cups...

Thank you for your help,
Spyros

TB0ne 10-31-2008 02:43 PM

Quote:

Originally Posted by spyros (Post 3327580)
Hi All,
I have three hard disk drives on my debian system but one of my hard disk drives has gone faulty!

Unfortunately it is the HD drive on which lie the / and swap file system i.e my debian OS.

What I would like to ask you is this:

Is there any way I can move my data on a new hard disk drive and have a working system as I did before or do I have to reinstall my OS from scratch as well as all my applications? Can I do a hard copy or take an image and install on a new probably larger in size disk, or even a sata drive?

I would like to avoid reinstalling everything, from DNS to cups...

If the disk is dead, there's no way to copy anything off of it. If it's STARTING to die, take immediate action. Grab a copy of systemimager, mkcdrec, or mondoarchive, and make a backup of the drive immediately. As soon as its done, power the drive down, and replace it with a new one. Recover from the backup.

Otherwise, you *COULD* just copy some files off the drive (config files, etc.), but if you're doing a fresh install, then copying files, you'd undoubtedly overwrite something in use, or a newer file with an older one, giving you an unstable system.

If it's dead...you've got no where to go but a new install and reconfig.

billymayday 10-31-2008 03:01 PM

If it isn't too far gone you could use "dd" to take a copy of the relevant partition(s) as well. I've used this method previously and it's worked.

You shouldn't need to copy the swap - you can just create a new one.


All times are GMT -5. The time now is 02:53 AM.