Repository navigation
Closed
Description
Summary
Add a --resume flag to both batchvault pack and batchvault unpack so an interrupted run (Ctrl+C, crash, power loss, network drop, CI timeout) can continue from where it stopped instead of starting over.
Motivation
BatchVault targets large files and many volumes, so a run can take hours. Today a failure part-way through means redoing finished work. --update skips unchanged files, but it does not recover a half-finished run: partial volumes, a missing manifest, or a file that was mid-restore.
Requirements
pack --resume
- Detect an incomplete archive in the output location and continue it.
- Skip files and volumes already completed and checksum-valid; re-create only partial or corrupt volumes.
- Validate that the existing partial state matches the current run (same inputs, volume size, compression, encryption, include/exclude settings). If not, refuse with a clear error rather than mixing outputs.
- Write progress state incrementally (e.g. a state/journal file) so resume does not depend on a finished manifest. Remove it on successful completion.
- The final manifest (and signature, and the archive
README.mdif enabled) must be identical in content to an uninterrupted run.
unpack --resume
- Skip files already restored and verified against the manifest checksums in the output folder.
- Re-restore any file that is missing, partial or fails its checksum.
- Keep the existing guarantee that nothing lands in the output folder until it is verified: partial output must live in a temp/staging location and never be mistaken for a finished file.
- Never overwrite or delete unrelated files already in the output folder.
Shared behaviour
- Clear messages: what was reused, what was redone, why a resume was refused.
- Works with the progress bar/ETA (account for already-completed work), JSON output, retries and settings-file configuration (
resumekey). - Interaction with other flags is defined and documented:
--update,--force,--delete-source(the source must only be deleted after the full restore is verified, never based on resumed state alone), encryption and signed manifests. - Without
--resume, existing behaviour is unchanged. - Also exposed in the Python API, GitHub Action input and Docker usage.
Acceptance criteria
-
pack --resumeandunpack --resumeimplemented and available in the CLI, API and GitHub Action - Interrupting a run at any point and resuming produces a result identical to an uninterrupted run (verified with
verify) - Corrupt or partial volumes/files are detected and redone, never trusted
- Mismatched options on resume are rejected with a clear error
- Works with encrypted and signed archives
- Tests cover interruption at different stages, resume with changed options, and corrupt partial data
- Documented in
docs/andCHANGELOG.md
Metadata
Metadata
Assignees
Labels
No labels
Activity
Add --resume to pack and unpack (issue #5, phase 1)
Add --resume to pack and unpack (issue #5, phase 1)
feat: --resume, archive README and package restructure (0.1.1) (#10)
coldsofttech commentedon Nov 14, 2026
Phase 1 is implemented in #10:
pack --resumeandunpack --resumecontinue an interrupted run at file level, using a run journal. It ships in 0.1.1. Continuing inside a single large file is tracked in #9.