Difference between revisions of "Ddrescue"
(Created page with "When disk fail or start failing you should back it up by making a copy of the hard drive '''then''' running the backup process. in simple cases the <code>dd</code> command can …") |
(Migrated.) |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Migrated}} | ||
+ | [https://docs.google.com/document/d/1pD9evN0e3xJQ-u_iztLdVupH9SeQzNW7f73l3pIb4is/edit?usp=sharing Link] | ||
+ | |||
+ | |||
When disk fail or start failing you should back it up by making a copy of the hard drive '''then''' running the backup process. | When disk fail or start failing you should back it up by making a copy of the hard drive '''then''' running the backup process. | ||
− | in simple cases the <code>dd</code> command can be | + | in simple cases the <code>dd</code> command can be used but it will often choke on failing drives. |
− | GNU <code>ddrescue</code> is a much better tool to use, it will do a very good job of getting a data off a failing disk. | + | GNU <code>ddrescue</code> is a much better tool to use, it will do a very good job of getting a data off a failing disk. N.B. it can take a very long time to do so if a drive is really bad. It should not be confused with <code>dd_rescue</code>. Though both do a similar job GNU <code>ddrescue</code> is the superior tool. |
to run it you need to do: | to run it you need to do: | ||
− | <code>sudo ddrescue /hard/ | + | <code>sudo ddrescue /hard/drive output.dd log.file</code> |
e.g. | e.g. | ||
<code>sudo ddrescue /dev/sda1 99999.dd 99999.log</code> | <code>sudo ddrescue /dev/sda1 99999.dd 99999.log</code> | ||
+ | |||
+ | Note: make sure the 99999.dd file is named as <code>/where/newhddismounted/99999.dd</code> | ||
Use the ticket number to name the output file and log. Including the log is very important. <code>ddresuce</code> will run with out it but the log file enables the process to resume if it is interrupted for any reason. | Use the ticket number to name the output file and log. Including the log is very important. <code>ddresuce</code> will run with out it but the log file enables the process to resume if it is interrupted for any reason. | ||
+ | |||
+ | '''Make sure to note which drive you put the files on.''' They are labeled IDE1, SATA1, IDE2 etc. | ||
Note it is possible to make a copy of the whole disc, rather than individual partitions (if for instance, there are multiple partitions to backup) but it makes it a little trickier to read the resulting image. | Note it is possible to make a copy of the whole disc, rather than individual partitions (if for instance, there are multiple partitions to backup) but it makes it a little trickier to read the resulting image. | ||
− | <code>ddrescue</code> tries very hard to rescue the data | + | GNU <code> ddrescue</code> will work with any block device e.g. cdroms, usb thumb drives, not just hard drives. |
+ | |||
+ | <code>ddrescue</code> tries very hard to rescue the data<sup>1</sup> and even it can't read it will rescue the remaining data in such a way as to preserve the file system structure (it leaves the unreadable parts blank but this won't affect other files). | ||
The full manual is here: | The full manual is here: | ||
− | + | https://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html | |
+ | |||
+ | |||
+ | <hr> | ||
+ | |||
+ | 1. Rather than try to read data in a linear fashion it divides the disk up into sections. If it has trouble reading a section it divides it again, splitting it up until it finds the smallest unreadable section. | ||
+ | |||
− | + | [[Category:Tech support]] |
Latest revision as of 12:18, 27 June 2014
This page has been migrated to a document on Free Geek's Google Drive. Information remaining behind may no longer be relevant. MIGRATOR: When you have tagged this page as migrated, (Link to new page immediately below.) |
When disk fail or start failing you should back it up by making a copy of the hard drive then running the backup process.
in simple cases the dd
command can be used but it will often choke on failing drives.
GNU ddrescue
is a much better tool to use, it will do a very good job of getting a data off a failing disk. N.B. it can take a very long time to do so if a drive is really bad. It should not be confused with dd_rescue
. Though both do a similar job GNU ddrescue
is the superior tool.
to run it you need to do:
sudo ddrescue /hard/drive output.dd log.file
e.g.
sudo ddrescue /dev/sda1 99999.dd 99999.log
Note: make sure the 99999.dd file is named as /where/newhddismounted/99999.dd
Use the ticket number to name the output file and log. Including the log is very important. ddresuce
will run with out it but the log file enables the process to resume if it is interrupted for any reason.
Make sure to note which drive you put the files on. They are labeled IDE1, SATA1, IDE2 etc.
Note it is possible to make a copy of the whole disc, rather than individual partitions (if for instance, there are multiple partitions to backup) but it makes it a little trickier to read the resulting image.
GNU ddrescue
will work with any block device e.g. cdroms, usb thumb drives, not just hard drives.
ddrescue
tries very hard to rescue the data1 and even it can't read it will rescue the remaining data in such a way as to preserve the file system structure (it leaves the unreadable parts blank but this won't affect other files).
The full manual is here: https://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html
1. Rather than try to read data in a linear fashion it divides the disk up into sections. If it has trouble reading a section it divides it again, splitting it up until it finds the smallest unreadable section.