summaryrefslogtreecommitdiff
path: root/scripts/run-chunk-recover.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/run-chunk-recover.sh')
-rwxr-xr-xscripts/run-chunk-recover.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/run-chunk-recover.sh b/scripts/run-chunk-recover.sh
new file mode 100755
index 0000000..f9a93d3
--- /dev/null
+++ b/scripts/run-chunk-recover.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+set -e
+rm -f ../scratch/dump-scratch.img
+cp --reflink=always ../scratch/dump-{zero,scratch}.img
+chmod 600 ../scratch/dump-scratch.img
+make -C ../btrfs-progs
+time ../btrfs-progs/btrfs rescue chunk-recover ../scratch/dump-scratch.img