LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Copy entire hard drive (https://www.linuxquestions.org/questions/linux-newbie-8/copy-entire-hard-drive-751374/)

SuperDude123 08-30-2009 11:07 PM

Copy entire hard drive
 
How would I copy an entire hard drive (windows partition) with a Ubuntu Live CD to an SSH server?

How would I then recover this entire hard drive (windows and all of its software) if the hard drive ever failed and I had to replace it with a new one?

kenneho 08-31-2009 01:07 AM

Hi.


There are more than one ways of doing this kind of thing, depending of your needs. I recommend you look into the "dd" command. Using this command you can copy the disk block by block, which is very useful.

However, recovering the whole disk may require you to update the partition table and maybe create a new boot loader (or maybe other things), but at least you have all your files in place.

SuperDude123 08-31-2009 01:18 AM

So dd VS Ghost? Advantages/disadvantage?

kenneho 08-31-2009 01:47 AM

I'm not familiar with ghost, so I'm not the rigth person to ask. Anybode else here knows?

vanstra 08-31-2009 05:15 AM

Use CloneZilla as LiveCD
http://www.clonezilla.org/

fotoguy 09-01-2009 04:05 AM

Yeah there are several ways to do this with a live cd/dvd, I find the quickest, or easiest way is to use the tools that are already part of a linux distro.

Admittedly I have only done this with linux, a few windows machines I have done, it's usually only the "My Documents" folder. The principle should be the same, as long as the linux distro can read the windows file system, then it shouldn't be a problem.

I prefer to use tar and gzip, then pipe it through ssh to another computer. For this example I would mount your windows partition under /mnt and the windows partition is on hda1, of course yours will be different, you just need to adjust to suit, then run the rest which will compress and send it to another computer, the good thing about tar and gzip, is you will get around 1/3 compression.

from the live cd/dvd
Quote:

mount -t ntfs /dev/hda1 /mnt
cd /mnt
tar zcvf - . | ssh username@192.168.1.10 "cat > backup.tar.gz"
Now as for restoring it, I have never done a full windows partition before so I cannot help with that side of it. You might be able to extract the backup file on the other machine and then burning it to a cd/dvd, this should be readable under windows, then you could do a reinstall of windows, boot into the windows OS, then copy the files from the cd/dvd to the right directories.


All times are GMT -5. The time now is 01:11 PM.