meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
datarecovery:safecopy [2016/08/19 19:04] niziak [safecopy] |
datarecovery:safecopy [2016/08/20 10:42] (current) niziak [stage#.badblocks files] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== safecopy ====== | ====== safecopy ====== | ||
There are some predefined settings: | There are some predefined settings: | ||
- | * **stage1**: Preset to rescue most of the data fast, using no retries and avoiding bad areas. Skip 10% of size when bad block found. 1 read attempt. | + | * **stage1**: Preset to rescue most of the data fast, using no retries and **avoiding bad areas**. Skip 10% of size when bad block found. 1 read attempt. |
- | * **stage2**: Preset to rescue more data, using no retries but searching for exact ends of bad areas. Skip 128 blocks when bad block found. 1 read attempt. | + | * **stage2**: Preset to rescue more data, using no retries but searching for **exact ends of bad areas**. Skip 128 blocks when bad block found. 1 read attempt. |
* **stage3**: Preset to rescue everything that can be rescued using maximum retries, head realignment tricks and low level access. Skip 1 block if bad block found. 4 read attempts. | * **stage3**: Preset to rescue everything that can be rescued using maximum retries, head realignment tricks and low level access. Skip 1 block if bad block found. 4 read attempts. | ||
Line 14: | Line 14: | ||
Every ''stage'' preset parameter can be overridden. | Every ''stage'' preset parameter can be overridden. | ||
E.g. for stage 3 is not needed to give additional stress to device with -R 4 and -Z 1, and better is to use: | E.g. for stage 3 is not needed to give additional stress to device with -R 4 and -Z 1, and better is to use: | ||
- | ```safecopy --forceopen -L 0 --stage3 -c 151275030 -Z 0 -R 1 /dev/sdb /dev/sdc``` | + | <code bash>safecopy --forceopen -L 0 --stage3 -c 151275030 -Z 0 -R 1 /dev/sdb /dev/sdc</code>\\ |
- | Note: ''-c'' parameter is used to continue previous ''safecopy'' interrupted by CTRL+C. | + | ****Note:** ''-c'' parameter is used to continue previous ''safecopy'' interrupted by CTRL+C.\\ |
+ | Note:** With ''-f'' parameter other than 1* you can miss good areas in between two bad ones. | ||
===== stage#.badblocks files ===== | ===== stage#.badblocks files ===== | ||
Line 29: | Line 30: | ||
Unrecoverable bad blocks (bytes): 60 (18100224) | Unrecoverable bad blocks (bytes): 60 (18100224) | ||
Blocks (bytes) copied: 151299151 (619721322496) | Blocks (bytes) copied: 151299151 (619721322496) | ||
+ | </code> | ||
+ | |||
+ | Number of lines in each ''stage#.badblocks'' file shows how each stage works: | ||
+ | <code bash> | ||
+ | # cat stage1.badblocks | sort | uniq | wc -l | ||
+ | 51200 | ||
+ | # cat stage2.badblocks | sort | uniq | wc -l | ||
+ | 4720 | ||
+ | # cat stage3.badblocks | sort | uniq | wc -l | ||
+ | 1477 | ||
</code> | </code> | ||
===== Usage example ===== | ===== Usage example ===== | ||
Line 46: | Line 57: | ||
===== Output ===== | ===== Output ===== | ||
<code> | <code> | ||
- | ......................................... [243958862] | ||
- | ......................................... [244000846] | ||
......................................... [244042830] | ......................................... [244042830] | ||
......................................... [244084814] | ......................................... [244084814] | ||
Line 87: | Line 96: | ||
.[151274323](+16384){XXX<<<<<<<}[151274620](+1216512) | .[151274323](+16384){XXX<<<<<<<}[151274620](+1216512) | ||
.[151274700](+327680){X<<<<<<<}[151274788](+360448) | .[151274700](+327680){X<<<<<<<}[151274788](+360448) | ||
- | .[151274789](+4096){XXXX<<<<<<<}[151275196](+1667072) | ||
- | .[151275198](+8192){X<<<<<<<}[151275203](+20480) | ||
- | .[151275238](+143360){X<<<<<<<}[151275280](+172032) | ||
- | .[151275345](+266240){XX<<<<<<<}[151275573](+933888) | ||
- | .[151275575](+8192){X<<<<<<<}[151275580](+20480) | ||
- | .[151275582](+8192){X<<<<<<<}[151275601](+77824) | ||
- | .[151275603](+8192){XX<<<<<<<}[151275793](+778240) | ||
.[151275798](+20480){XXX<<<<<<<}[151276078](+1146880) | .[151275798](+20480){XXX<<<<<<<}[151276078](+1146880) | ||
.[151276107](+118784){X<<<<<<<}[151276110](+12288) | .[151276107](+118784){X<<<<<<<}[151276110](+12288) | ||
Line 102: | Line 104: | ||
..[151278398](+7725056){XXXX<<<<<<<}[151278843](+1822720) | ..[151278398](+7725056){XXXX<<<<<<<}[151278843](+1822720) | ||
.[151278847](+16384){XX<<<<<<<}[151279033](+761856) | .[151278847](+16384){XX<<<<<<<}[151279033](+761856) | ||
- | .[151279034](+4096){X<<<<<<<}[151279043](+36864) | ||
- | .[151279048](+20480){X<<<<<<<}[151279049](+4096) | ||
- | .[151279058](+36864){X<<<<<<<}[151279160](+417792) | ||
- | .[151279166](+24576){X<<<<<<<}[151279170](+16384) | ||
.[151279172](+8192){X<<<<<<<}[151279173](+4096) | .[151279172](+8192){X<<<<<<<}[151279173](+4096) | ||
.[151279178](+20480){X<<<<<<<}[151279179](+4096) | .[151279178](+20480){X<<<<<<<}[151279179](+4096) | ||
Line 113: | Line 111: | ||
.[151279646](+24576){X<<<<<<<}[151279684](+155648) | .[151279646](+24576){X<<<<<<<}[151279684](+155648) | ||
.[151279685](+4096){XXX<<<<<<<}[151280013](+1343488) | .[151279685](+4096){XXX<<<<<<<}[151280013](+1343488) | ||
- | .[151280014](+4096){X<<<<<<<}[151280023](+36864) | ||
- | .[151280032](+36864){X<<<<<<<}[151280141](+446464) | ||
- | .[151280145](+16384){X<<<<<<<}[151280155](+40960) | ||
- | .[151280221](+270336){X<<<<<<<}[151280335](+466944) | ||
- | .[151280410](+307200){X<<<<<<<}[151280471](+249856) | ||
.[151280572](+413696){X<<<<<<<}[151280636](+262144) | .[151280572](+413696){X<<<<<<<}[151280636](+262144) | ||
.[151280638](+8192){XX<<<<<<<}[151280812](+712704) | .[151280638](+8192){XX<<<<<<<}[151280812](+712704) | ||
Line 126: | Line 119: | ||
Blocks (bytes) copied: 244190646 (1000204886016) | Blocks (bytes) copied: 244190646 (1000204886016) | ||
</code> | </code> | ||
+ | |||
===== Continue interrupted copy ===== | ===== Continue interrupted copy ===== |