LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-20-2007, 09:20 PM   #1
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Fedora (Desktop), CentOS (Server), Knoppix (Diags)
Posts: 934

Rep: Reputation: 38
Using 'dd' to copy hard drives?


I'm running FC5. I want to back up my entire hard drive. Can I use dd to do this? Can I do it while the partitions are mounted?

Would something like 'dd if=/dev/hda of=/dev/hdb' work to get this done?
 
Old 02-20-2007, 09:29 PM   #2
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
Quote:
Originally Posted by SlowCoder
I'm running FC5. I want to back up my entire hard drive. Can I use dd to do this? Can I do it while the partitions are mounted?

Would something like 'dd if=/dev/hda of=/dev/hdb' work to get this done?
I've not tried it while the hd's are mounted, but I have a feeling it won't work.... worth a try, I suppose.

You have the syntax correct, but you might want to add a block size argument to speed things up. I typically use the size of the disk buffer, i.e.

dd if=/dev/hda of=/dev/hdb bs=8M

Note that if there are bad sectors on the write-to drive, this may fail.

If you don't need the partition table, you may be better off rsyncing each partition individually... or even cp -pur
 
Old 02-20-2007, 09:45 PM   #3
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Fedora (Desktop), CentOS (Server), Knoppix (Diags)
Posts: 934

Original Poster
Rep: Reputation: 38
I, too, have a feeling running dd on a mounted drive won't work.

My situation is that I've got a FC4 box at work that I need to be able to back up, but not bring the server down in the mean-time.

In the event of failure, I need to get the machine running ASAP. Therefore, a hard drive image is my best option, as far as I can tell.

Of course I'm willing to take suggestions.
 
Old 02-20-2007, 10:18 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,542

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
Imaging solutions are poison IMHO. The psuedo filesystems (/dev and /proc come to mind) always present problems.
Perhaps you should read this thread before proceeding too far down this track.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
2 hard drives, XP on my main sata drives, 10.2 on my IDE LILO doesnt show on boot up Dachy Slackware 14 01-03-2008 07:01 AM
Hard Drive Partitioning for Large Hard Drives Matir Linux - General 2 12-26-2006 05:55 AM
External Hard Drives/Hard Drives ddrfreak Mandriva 1 12-16-2004 06:12 PM
Upgrading hard drives on Software raid 1 boot drives. linuxboy123 Linux - General 0 12-11-2003 03:28 PM
Copy Files Between Drives Causes Kernel Panic/Freeze of the System php Slackware 7 08-14-2003 07:30 PM


All times are GMT -5. The time now is 05:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration