This script is designed to intelligently split a large folder (such as /srv/media) across multiple external drives — one drive at a time.
- Stage-based copy: connect one drive at a time
- Real usable space supported (MiB from
lsblk) - Logs a
.backup_manifest.txtto mark drives as completed - Resumable: skips already completed drives
- Dry run supported
python3 backup_stager.py \
--source "/srv/media" \
--drive "DriveA:2861588" \
--drive "DriveB:1953513" \
--output "/mnt/backup"Use:
lsblk -b -o NAME,SIZE,MOUNTPOINTThen divide the SIZE in bytes by 1024^2 to get MiB.
Ensure your mountpoint (/mnt/backup by default) is mounted before continuing. The script will stop if it's not.
Each connected drive will receive a .backup_manifest.txt log with the files it was assigned.
If you need to re-do a drive, just delete the .backup_manifest.txt file from its root.
Created for safe and repeatable staged backups from a server.