Repository navigation
v0.4.2
Added
- Disk backup to image file (
s) — new action that reads the selected disk sector-for-sector through an uncached direct handle and writes it to an.imgfile. Progress is reported every 250 ms; the disk itself is never written to. On success the message reminds you that the image can be restored onto any disk of at least that size withi(write image). - Backup path prompt with a sensible default — pressing
sopens an input dialog pre-filled with%USERPROFILE%\disk<N>-<name>.img, where<name>is the disk name reduced to alphanumerics,-and_(max 24 chars). Surrounding quotes are stripped and.imgis appended automatically if no extension is given. - Backup destination validation — the prompt refuses to proceed if the path is empty or not a full path, if the parent folder does not exist, or if the file already exists (existing files are never overwritten). It also checks free space on the destination volume (via
GetDiskFreeSpaceExW) and rejects the backup if there is less free space than the disk's size, telling you how much is available versus needed. - Backup cannot land on the disk being imaged — the destination's drive letter is resolved (after canonicalizing the path) and compared against the selected disk's partitions; if it matches, the backup is refused with an explanation, since an image written onto its own source would never be consistent.
- Disk-to-disk clone (
d) — new action that copies the selected disk sector-for-sector onto another disk. Pressingdasks for the target disk number; a confirmation dialog then spells out exactly which disk will be overwritten (Overwrite THIS disk with a sector-for-sector clone of disk N (name · size), then verify). - Clone target validation — the target must be an existing disk number, must not be the same device as the source (matched by number/serial/size/name, or by identical serial and size), and must be at least as large as the source ("shrinking clones are not supported").
- Clone verification pass — after the copy, the source and target are both re-read and compared chunk by chunk. A mismatch aborts with
VERIFICATION FAILED at offset …and the byte offset of the first difference, with a hint that a live source that changed mid-copy or a faulty target is the likely cause. Cancelling during verification reports that the clone itself was already fully written. - Clone brings the target online afterwards — once verified, the app runs
Set-Disk -IsOffline $falseandUpdate-HostStorageCacheon the target. The success message notes that Windows may keep the clone offline if its disk signature collides with the source, and suggests unplugging the source or onlining it in Disk Management. - Clone target goes through the existing prep pipeline — the target is wiped via the same prep script as other destructive actions (identity check, write-protection check, wipe) before any data is written; the source is only ever opened for reading.
- Live-snapshot notice — both backup and clone log a note when the source has mounted volumes, reminding you to close programs writing to it for a consistent image.
- Footer and help updates — the footer now lists
s backupandd clone(withi write imageshortened toi writeandc copy logtoc logto make room), and the?help screen documents both new keys. README gains entries for Backup and Clone (plus Surface scan and Health, which were missing).
Changed
- Partition table is written last when writing images (
i) — the first chunk of the image (which holds the partition table) is now held back and written after the rest of the image. Previously, once a valid table landed at sector 0, Windows could automount the new volumes mid-write and then refuse further raw writes to them. AWriting the partition table (first sectors)…log line marks this final step. Clone uses the same ordering. - Input dialog is wider (68 to 78 columns) to fit the longer backup/clone prompts, and the help modal grew two rows for the new keys.
Fixed
- Confirmation re-check now verifies the confirmed target, not the highlighted row — after confirming a destructive action, the app previously compared the snapshot against whichever disk was currently selected. It now looks up the disk by number in the live list and checks it is still the same device, which is what makes clone safe when the confirmed target is not the selected row. Clone additionally re-validates the source disk the same way before starting, aborting with "nothing was touched" if either disk changed.
Security
- Clone targets are subject to the same protection guards as the selected disk — a new target guard refuses to clone onto a protected disk (system/boot etc.) unless the
usafety override is active, and requires an elevated terminal. Backup and clone both require administrator rights up front. - Cancelled backup cleans up — cancelling a backup deletes the partial image file rather than leaving a truncated
.imgbehind; cancelling a clone warns that the target holds an incomplete clone and should be erased before use.
Full Changelog: v0.4.1...v0.4.2