Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Backup Hard Disk.
#1

I want to backup my hard disk to another hard disk, how can I do it..?

I know we can make it using dd command, but I don't know how the syntax is.

I want to copy all the thing from my harddisk to another hard disk.

And if possible, including all the setting?

 

Anybody can help me..

 

thank you...

Reply
#2

the syntax is as follows

 

dd if= of=

 

so if you hard discs are

 

/dev/sda

and

/dev/sdb

 

and you wanted to copy the contents of sda to sdb then do as follows

 



Code:
dd if=/dev/sda of =/dev/sdb




 

to find out what your hard discs are do this

 



Code:
fdisk -l




 

it should display something like this

 

Quote:[root@www ie7]# fdisk -l 

Disk /dev/hda: 120.0 GB, 120034123776 bytes

255 heads, 63 sectors/track, 14593 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

Device Boot Start End Blocks Id System

/dev/hda1 * 1 13 104391 83 Linux

/dev/hda2 14 14593 117113850 8e Linux LVM

 

Disk /dev/hdb: 120.0 GB, 120034123776 bytes

255 heads, 63 sectors/track, 14593 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

Device Boot Start End Blocks Id System

/dev/hdb1 * 1 14589 117186111 83 Linux
 

in the above example there are two hdd's one is

 

/dev/hda

 

the other is

 

/dev/hdb

 

cheers

anyweb

Reply
#3

Quote:the syntax is as follows 

dd if= of=

 

so if you hard discs are

 

/dev/sda

and

/dev/sdb

 

and you wanted to copy the contents of sda to sdb then do as follows

 



Code:
dd if=/dev/sda of =/dev/sdb

<div>


</div>
 

 

I'm trying to do the same. Does dd copy EVERYTHING including partitions etc etc? Would this new drive be bootable (if I were to copy my current undersized, old and slow drive to a newer, bigger one)? I've only seen the dd command used (in other posts and forums) to copy an image to something...this included the partitions.

Reply
#4
yes dd copies everything incluing blank space (byte for byte)
Reply
#5



Code:
dd if=/dev/sda of=/dev/sdb




 

/dev/sdb is required to be at least the same size or larger in capacity than /dev/sda in order for dd to work.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)