Btrfscue-Recover files from damaged BTRFS filesystems.

btrfscue

btrfscue is an advanced data recovery tool for the BTRFS filesystem. Despite being a state of the art filesystem, at the time when I started writing this (Q2 2011), BTRFS did not have a stable fsck tool that is capable of restoring a filesystem to a mountable state after a power failure or system crash. Recently, this situation has somewhat improved with the btrfs restore command. Unlike this official tool, btrfscue is designed to be able to restore data from disk images that were obtained from faulty storage devices or if all superblocks were overwritten inadvertently.
Being a recovery tool, btrfscue works best on disk images and will write recovered data to a directory. It can thus be used to convert BTRFS filesystems to any other filesystem supported by the host OS. It will also recover recently deleted files and directories and aid in BTRFS filesystem forensics.

Development State

As the version number 0.3 implies, this software is pretty much in alpha state. In fact, the repository you're looking at now is a complete rewrite of an earlier attempt that was written in C++ as early as 2011 (so don't let the copyright years fool you :)).
This works:
  • Heuristic detection of filesystem identifiers
  • Dump meta data to file
  • Listing of files and directories in the metadata
  • FUSE-mounting a "rescue" view of the metadata
This definitely does not work:
  • Actually restoring files bigger than the filesystem block size
  • Running on big-endian machines
  • BTRFS RAID levels, multi-device FS. These are planned for later.

Requirements

  • Go 1.8 or higher
  • Git version 1.7 or later
  • Optional: CDBS (to build the Debian packages)
  • Optional: GNU Make

    How to Build

    General way to build from source via go get:
    go get blichmann.eu/code/btrfscue
    

    Build using Make

    To build from a specific revision/branch/tag, not using go get:
    mkdir -p btrfscue && cd btrfscue
    git clone https://github.com/cblichmann/btrfscue.git .
    # Optional: checkout a specific rev./branch/tag using i.e. git checkout
    make
    You may want to create a symlink to the binary somewhere in your path.

    Packages

    At the moment, only building Debian packages is supported. Just run make deb to build.

    Usage

    btrfscue command-line syntax is generally as follows:
    btrfscue SUBCOMMAND OPTION...

Source and download

No comments