What's Changed
Changed
- Backup and restore progress now weights the rsync transfer far above the
pre/post hooks, so the bar tracks the copy. Every progress phase — the
optional pre/post hooks and each rsync sync — previously carried equal weight,
so on a typical single-volume package the instant pre-backup hook alone
accounted for a third of the bar while the rsync (the part that actually takes
time) was squeezed into a band too narrow for its fractional progress to move
the rounded total: it sat at 33% for the whole transfer and then jumped. Each
rsync sync phase now defaults to weight80(DEFAULT_SYNC_WEIGHT) and each
pre/post hook phase to10(DEFAULT_HOOK_WEIGHT), and a pre/post phase is
added only when that hook is actually set — so a hook-less backup is just its
rsync phase(s) and tracks the copy directly. All weights are overridable:
setPreBackup/setPostBackup/setPreRestore/setPostRestoretake an
optional secondweightargument, and a sync's weight is set via the new
BackupSync.weightfield (or theweightkey onaddVolume's options).
Pre/post hooks now receive aPhaseHandlefor their own phase rather than a
full sub-tracker. createBackupno longer marks its own progress tracker complete. The
StartOS backup harness owns per-package completion and holds the phase open
until the package's.s9pkimage has finished writing to the backup target,
so a package reports 100% and "still working" during the image write rather
than a premature "done". Restore is driven by the init harness and was already
finalized externally, so it is unchanged in this respect.