Clining a HD with Linux??


  Any idea in how could I clone a HD with Linux?
dirty_alAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

roaldCommented:
If you want to make a bit for bit copy you can use:

dd if=/dev/hda of=/dev/hdb

This will copy the contents of hda to hdb. After that you just change the hostname an ip (or better run dhcp) and off you go. Make sure hdb is bigger er equal in size to disk hda.
0
EatEmAndSmileCommented:
I couldn't give a better answer! :)
--------------_4D48008EDF00BFFFEDD4
Content-Disposition: form-data; name="notify"

on
--------------_4D48008EDF00BFFFEDD4
Content-Disposition: form-data; name="Submit"

Submit
--------------_4D48008EDF00BFFFEDD4--
0
dirty_alAuthor Commented:

   I need a solution that can copy content, not a bit copy, so I can use HD with different sizes to clone.
0
EatEmAndSmileCommented:
Well, so just mount the two HDs, then considering your origin HD is mounted on the root point and your destination HD is mounted on the /backup point type:

 cp -r / /backup

 That's all, folks!
--------------_4D48009AE458BFFFEDD4
Content-Disposition: form-data; name="notify"

on
--------------_4D48009AE458BFFFEDD4
Content-Disposition: form-data; name="Submit"

Submit
--------------_4D48009AE458BFFFEDD4--
0
Wouter WolkersCommented:
I wouldn't use cp to do such a thing. One could lose permissions and file dates.

just mount the target disk and start the tar copy.

As stated the linux Tips howto:

2.6.  Moving directories between filesystems. Alan Cox,
  A.Cox@swansea.ac.uk

  Quick way to move an entire tree of files from one disk to another


       (cd /source/directory && tar cf - . ) | (cd /dest/directory && tar xvfp -)




  [ Change from cd /source/directory; tar....etc.  to prevent
possibility of trashing directory in case of disaster.  Thanks to
Jim Dennis,  jim@starshine.org, for letting me know. -Maint. ]
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.