Initial remote commit

This commit is contained in:
2026-04-30 11:04:05 +00:00
commit b86e4f9a98
103 changed files with 262770 additions and 0 deletions

21
batch_restore.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Batch-restore metadata for already-extracted trees.
# Usage: ./batch_restore.sh
set -euo pipefail
DEST="/mnt/recovered/apr30"
INPUT="orphan_roots.txt"
JOBS=10
while read -r inum rest; do
[[ -z "$inum" || "$inum" == \#* ]] && continue
dest="${DEST}/${inum}"
[[ -d "$dest" ]] || continue
python3 restore_meta.py "$inum" "$dest" &
while (( $(jobs -r | wc -l) >= JOBS )); do
wait -n 2>/dev/null || sleep 0.2
done
done < "$INPUT"
wait
echo "All done"