Three high-value improvements for cluster restore:
1. Weighted progress by database size
- Progress now shows percentage by data volume, not just count
- Phase 3/3: Databases (2/7) - 45.2% by size
- Gives more accurate ETA for clusters with varied DB sizes
2. Pre-extraction disk space check
- Checks workdir has 3x archive size before extraction
- Prevents partial extraction failures when disk fills mid-way
- Clear error message with required vs available GB
3. --parallel-dbs flag for concurrent restores
- dbbackup restore cluster archive.tar.gz --parallel-dbs=4
- Overrides CLUSTER_PARALLELISM config setting
- Set to 1 for sequential restore (safest for large objects)
The test was flaky because it used crypto/rand for random data,
causing non-deterministic chunk boundaries. With small sample sizes
(100KB / 8KB avg = ~12 chunks), variance was high - sometimes only
42.9% overlap instead of expected >50%.
Fixed by using math/rand with seed 42 for reproducible test results.
Now consistently achieves 91.7% overlap (11/12 chunks).