Skip to content

Make Data Management backup jobs durable, cancellable, and overlap-safe #1092

Closed

Description

@paullizer

Summary

Make full and partial Data Management backup jobs durable, cancellable, recoverable, and mutually exclusive, with a latest-only item state contract that supports reliable differential backup and restore workflows.

User Value

Administrators need long-running backups to survive worker restarts, avoid overlapping scheduled/manual runs, expose useful progress, and stop safely on request. They also need to know the latest backup disposition for each Cosmos record, AI Search document, and source blob without retaining duplicate per-item history outside the existing job history.

Proposed Behavior

  • Persist an immutable normalized backup plan, source cutoff, attempt/lease generation, phase state, per-resource checkpoints, and bounded per-item or per-batch checkpoints.
  • Coordinate backup execution with a source-scoped lock so full and partial jobs cannot overlap. Scheduled occurrences should be deferred or recorded as skipped while an active backup owns the scope, rather than starting another worker.
  • Add admin-only cancellation for queued and running backups. Queued jobs cancel immediately; running workers stop at durable boundaries and cannot write after terminal cancellation.
  • Recover queued or stale backup jobs after restart or deployment and expose Retry/Resume for incomplete work without replaying verified units.
  • Define latest-only backup item state for Cosmos records, AI Search documents, and source blobs. Track source identity/version, job ID, artifact/checkpoint identity, timestamp, status, and failure/skip summary while leaving attempt history in job records.
  • Store latest-item state in a sidecar/manifest design that does not mutate source records in a way that advances _ts, ETag, or Last-Modified and makes every item appear changed.
  • Make full, partial, and differential semantics explicit, including a stable source cutoff and non-destructive default deletion policy.
  • Treat item failures as reportable warnings where safe: continue independent work, record skipped/failed items, complete with warnings, and permit focused retry.
  • Define a shared progress contract for counts, bytes, RU, retries, skip/failure counts, rates, heartbeat, lease, current resource, and last successful checkpoint.

Acceptance Criteria

  • At most one active full or partial backup owns the configured source scope across manual requests, scheduler ticks, workers, and App Service instances.
  • Queued and running backups can be canceled from authenticated admin API/UI controls, and no artifact or state writes occur after a job reaches canceled.
  • Failed, canceled, stale, and interrupted backups can resume from verified durable checkpoints after worker or App Service restart.
  • Cosmos records, AI Search documents, and source blobs have a latest-only backup state contract that supports differential decisions without causing source-version churn.
  • Full/partial/differential cutoffs and deletion semantics are stable, explicit, and represented in the backup manifest.
  • Independent item failures are skipped and reported without aborting the whole backup unless manifest integrity or another safety invariant is violated.
  • Job detail exposes bounded, sanitized progress and failed/skipped item summaries without settings, credentials, SAS URLs, or content.
  • Functional, scheduler/recovery, concurrency/fencing, and authenticated UI tests cover cancellation, overlap prevention, resume, and latest-item state.
  • Data Management backup and recovery documentation explains lifecycle states, differential semantics, and operator recovery.

Notes

Activity

  1. moved this from Pending Evaluation to Pending Assignment in Simple Chat Roadmapon Jul 29, 2026
  2. paullizer commented on Jul 30, 2026

    @paullizer
    ContributorAuthor

    Implemented durable Data Management backup jobs in PR #1105: #1105

    Final commit: 3a8ffec0982b1f1efa4420a679613d896e4569bd

    Summary:

    • Immutable backup plans and conservative source cutoffs, source-scoped fencing, durable resource/batch checkpoints, and lineage-scoped latest-only sidecar state for Cosmos, AI Search, and source blobs.
    • Version-pinned Key Vault encryption references, authenticated cancellation and focused retry/resume, stale and queued recovery, transfer-time lease heartbeats, bounded redacted progress/timelines, and non-destructive differential/deletion manifest semantics.
    • Bicep and Terraform container provisioning, admin UI controls, functional/security/UI coverage, documentation, release notes, and version 0.250.073.

    Validation: 109 passed, 1 deselected across backup durability, Data Management migration/recovery/provenance/fencing/security, static UI, and all route-policy tests; changed Python files compiled; JS syntax, Bicep build/diagnostics, Terraform formatting, whitespace, and conflict checks passed.

    Remaining risk: the authenticated live-browser test was deselected because this environment has no configured admin storage state; the PR adds static UI/API coverage for that surface.

  3. moved this from Pending Assignment to Released in Simple Chat Roadmapon Jul 31, 2026
  4. moved this from Released to No status in Simple Chat Roadmapon Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions