Jump to content
Sign in to follow this  
munyit

Backup Hard Disk.

Recommended Posts

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...

Share this post


Link to post
Share on other sites

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

 

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

 

to find out what your hard discs are do this

 

fdisk -l

 

it should display something like this

 

[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

Share this post


Link to post
Share on other sites
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

 

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

 

 

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.

Share this post


Link to post
Share on other sites

yes dd copies everything incluing blank space (byte for byte)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...