Talk Root - PC Hardware, Software and Web Development forums

Go Back   Talk Root - PC Hardware, Software and Web Development forums > Operating Systems > Linux Discussion > Red Hat


Welcome to the Talk Root - PC Hardware, Software and Web Development forums. Are you a programmer, web developer, IT guy or a computer guru? We invite you to join our forums and participate in friendly discussion. It doesn't matter your skill level, we are here to help everyone.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
Sponsored Links
Reply
 
LinkBack Thread Tools Rate Thread
Old 02-19-2004, 03:46 AM   #1
PU
 
Posts: n/a
dd command

Hi all,

I previously used to command:
dd if=/dev/hda1 of=/mnt/hdb1/safecopy

It finishes successfully so I assume I have a backup of my /dev/hda1
partition.

Using the following line:
ls /mnt/hdb1
and I see the file safecopy.

My question:
If hda crashes, do I merely replace the hdd, configure the drive similar the
crashed drive and issue something like:
dd if=/mnt//hdb1/safecopy of=/dev/hda1
to restore?

Am I better off having a duplicate copy of hda1 e.g.
dd if=/dev/hda1 of=/dev/hdb1
Then if I have a hda crash, I plug in hdb as hda and install a new hdd as
hdb and just make a copy of it again.

I googled, and although there is a lot of material regarding the above, I
cannot seem to find a straight forward answer.
Any answers appreciated.

Regards
Leigh

cc to leejen666@hotmail.com



 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 02-19-2004, 10:20 AM   #2
Scott Lurndal
 
Posts: n/a
Re: dd command

"PU" <leejen666@hotmail.com> writes:
>Hi all,
>
>I previously used to command:
>dd if=/dev/hda1 of=/mnt/hdb1/safecopy
>
>It finishes successfully so I assume I have a backup of my /dev/hda1
>partition.
>
>Using the following line:
>ls /mnt/hdb1
>and I see the file safecopy.
>
>My question:
>If hda crashes, do I merely replace the hdd, configure the drive similar the
>crashed drive and issue something like:
>dd if=/mnt//hdb1/safecopy of=/dev/hda1
>to restore?


If the partitions are identically sized, then yes.

If you want to check the correctness of your safecopy, use
$ mkdir -p /mnt/tmp
$ mount -o loop -t ext2 /hdb1/safecopy /mnt/tmp
(substitute appropriate filesystem type for ext2 as necessary)

You should then see a copy of your filesystem under /mnt/tmp.

$ umount /mnt/tmp # when done

>
>Am I better off having a duplicate copy of hda1 e.g.
>dd if=/dev/hda1 of=/dev/hdb1


No. If this were to work at all, you'd need to use
$ dd if=/dev/hda of=/dev/hdb bs=128K

But both drives would need to be identically sized (or hdb need
be larger - if larger extra space will be wasted)

Using hda rather than hda1 will capture the MBR which is required
for boot purposes.

It's better, albeit slower, to use cpio or tar or rdist to backup
a filesystem as this allows dissimilar hardware to be used.

After a crash, reinstall a clean distro on a new disk and restore from
your backup rdist/cpio/tar archive(s).

scott

 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 12:29 PM.


Sponsors
Banner Best Deals 24x7 @ Geeks.com!
Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.0.0 RC8
vB Ad Management by =RedTyger=
© 2006 TalkRoot.com -