Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

General data rescue

Darren Ldl edited this page Apr 14, 2019 · 8 revisions

Purpose

This page only gives you the general instruction and direction. If you are interested in examples of specific scenarios and potential solutions, see Data rescue scenarios and demos and Data repair scenarios and demos.

If your drive is failing

DO NOT use blkar directly to try to read data from a failing drive

ddrescue is capable of doing smart reads of drives in order to retrieve as much data as possible before the drive fails completely, while blkar only does a naive linear scan of the file, and may cause the drive to die much earlier compared to using ddrescue.

Use ddrescue or equivalent software to image your disk first, then use blkar to work on the image file with rescue mode.

Rescuing data

After you have imaged your disk, assuming the disk image is named disk.img, you can begin extracting SBX containers by using

blkar rescue disk.img rescued_data

where rescued_data is the folder for storing outputs.

See Data rescue scenarios and demos for more infomation.

Sorting data

Data rescued by rescue mode are valid SBX containers, but the blocks may not be in the original order. The original sequential or interleaved ordering is required for repair mode to function.

You can fix this by sort mode, this will write out a sorted container using blocks of the input container

blkar sort rescued_data/UID

where UID is the UID of some rescued SBX container.

.sorted is appended to the container name if no alternative name is provided.

See Container sorting scenarios and demos for more infomation.

Repairing data

If your container uses an error correction capable SBX version, then you can invoke the repair mode to try to repair the container if it's in the correct order or sorted using instructions above.

blkar repair rescued_data/UID.sorted

You can also supply --dry-run flag to test if the container is actually repairable first to avoid blkar damaging the container.