Quote:
Originally Posted by dime111
Anyway i tried DD it completed successfully
|
copied from where to where?
- from the old drive to a backup file on backup drive then back to new drive?
- or just from the backup drive to the new drive?
possibly you want to do like on
this site
- with the old disk in as /dev/sda boot from a livecd and run
dd if=/dev/sda of=/mnt/backup-drive/old-disk.img conv=noerror
the noerror part is so that it keeps going where the old failing drive experiences io errors
- then replace old drive with new drive
- boot from a livecd and run
dd if=/mnt/backup-drive/old-disk.img of=/dev/sda
where /dev/sda is the new disk
- then boot from new disk
however this does require the backup drive to be bigger than the drive being backed up. A possible solution to this would be to pipe the output of dd via gzip or something. eg
when creating the disk image you could use
dd if=/dev/sda conv=noerror | gzip > /mnt/backup-drive/old-disk.img.gz
if your disk has been used for awhile and had files written all over the disk surface you'll probably only get close to 2:1 compression, but if it's a fairly new disk you should get much better compression as an endless stream of zeros compresses very well. There are ways to put zeros in the free space but I wouldn't do that on a failing disk as it stresses the disk even more and the likely compression factor of close to 2:1 isn't too bad.
restoring directly from a compressed file is something I haven't done but I'm guessing something along the lines of
gzip -d /mnt/backup-drive/old-disk.img.gz | dd of=/dev/sda
would get the job done. But I'm only guessing here and would appreciate the thoughts and experiences of others on this bit.