Skip to content

Instantly share code, notes, and snippets.

@nl5887
Created November 8, 2013 10:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nl5887/7369357 to your computer and use it in GitHub Desktop.
Save nl5887/7369357 to your computer and use it in GitHub Desktop.
Try to restore all btrfs there is
export DISK=/dev/loop3
export DEST=/data/recov
btrfs-find-root /dev/loop3 2>&1|grep seems|awk '{print $3}' > blocks
for i in $(cat blocks); do mkdir -p $DEST/$i; btrfs restore -o -v -t $line $DISK $DEST/$i; done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment