Initial remote commit
This commit is contained in:
26
batch_recover_resume.sh
Executable file
26
batch_recover_resume.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
# Resume a batch extraction — skips inodes whose destination already exists.
|
||||
# Equivalent to batch_recover.sh --skip-existing but kept separate for clarity.
|
||||
set -euo pipefail
|
||||
|
||||
DEST="/mnt/recovered/apr30"
|
||||
DB="inodes.db"
|
||||
INPUT="orphan_roots.txt"
|
||||
JOBS=10
|
||||
|
||||
mkdir -p "$DEST"
|
||||
|
||||
while read -r inum rest; do
|
||||
[[ -z "$inum" || "$inum" == \#* ]] && continue
|
||||
python3 extract_tree.py \
|
||||
--db "$DB" \
|
||||
--dest "$DEST" \
|
||||
--skip-existing \
|
||||
"$inum" &
|
||||
while (( $(jobs -r | wc -l) >= JOBS )); do
|
||||
wait -n 2>/dev/null || sleep 0.2
|
||||
done
|
||||
done < "$INPUT"
|
||||
|
||||
wait
|
||||
echo "All done"
|
||||
Reference in New Issue
Block a user