Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Possible Duplicate:
Using DD for disk cloning

What's the easiest and most reliable, risk free, way of making an exact copy of a hard drive?

We have a drive that's been messed up by someone re-initialising RAID on it and before we start playing with solutions for fixing it i'd like to get an exact copy of it.

Bearing in mind it won't mount to Linux or Windows at this point, what are the options?

The only one that springs to my mind is DD in Linux. Recommendations appreciated.

share|improve this question

marked as duplicate by Ben Pilbrow, SvW, Iain, John Gardeniers, Scott Pack Mar 29 '11 at 11:35

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2  
This is a duplicate, but I don't think it deserves a downvote... –  Ben Pilbrow Mar 29 '11 at 7:34
    
Thanks, the main reason for posting this question was to find out if using DD was going to be the right way - it's a fair while since I used it for this kind of thing and wanted to ensure that my approach wasn't going to be an old outdated approach that had since been superceded by modern tools. Thanks to all for confirming! –  Matt Peddlesden Mar 29 '11 at 9:27
    
I used the examples in the question I linked to only a few weeks ago - definitely still relevant and still very good :-) –  Ben Pilbrow Mar 29 '11 at 9:31
add comment

3 Answers

up vote 3 down vote accepted

If the device is there at /mnt/md0 or wherever then dd will work, to backup to a file use:

dd if=/dev/md0 of=/tmp/raid1.img

the output can be another device:

dd if=/dev/md0 of=/dev/sdb
share|improve this answer
add comment

There are a variety of tools that you can use. dd is probably as good as many. Clonezilla is a good tool, there are more on this wikipedia page too.

share|improve this answer
add comment

Bearing in mind it won't mount to Linux or Windows at this point, what are the options?

As advised use DD or Clonezilla. They do not need the drive to be mounted - just present and visible by the OS (i guess at one of these points: /dev/sd[0-9] ). If you want to do it to more than one drive from a raid configuration - image/backup them one by one writing their position (sequence in raid) so you know which one after which was in the raid configuration and to witch raid controller port connected

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.