Skip to content

Add --resume to pack and unpack to continue interrupted runs #5

Closed

Description

@coldsofttech

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.md if 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 (resume key).
  • 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 --resume and unpack --resume implemented 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/ and CHANGELOG.md

Activity

  1. added a commit that references this issue on Nov 2, 2026
  2. coldsofttech commented on Nov 14, 2026

    @coldsofttech
    OwnerAuthor

    Phase 1 is implemented in #10: pack --resume and unpack --resume continue 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions