Skip to content

feat(backups): add automatic backup scheduling and checkpoint history - #4143

Open
BeeJoe wants to merge 88 commits into
Start9Labs:masterfrom
BeeJoe:feat/auto-backups
Open

BeeJoe wants to merge 88 commits into
Start9Labs:masterfrom
BeeJoe:feat/auto-backups

Conversation

@BeeJoe

@BeeJoe BeeJoe commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Schedule unattended backups from System → Backups → Automatic backups or the CLI. Jobs select System data, current and future services, a registered target, a timezone, timing, and checkpoint retention. Restore individual or mixed service checkpoints, preview retention removals, and review failures and new-service decisions.

Schedule + registered target + services
  -> coordinated backup/restore
  -> retained checkpoints and transfer measurements
  -> retention previews, recovery, and notifications

Integrates upstream's target catalog, pinned source mounts, isolated service backups, shared-volume backups, and paginated manual history. The main Backups page combines manual backups, automatic runs, and restores into one searchable, filterable history, preserving older manual entries and full reports including shared volumes. Checkpoints remain under backup.checkpoint and manual reports under backup.history. Shared volumes are selected independently from the manual Backups page. Existing disk schedules and saved unlock credentials migrate to registered target IDs, and targets cannot be removed while schedules reference them.

Jobs support immediate runs, pause/resume, and target repair or reassignment. Interrupted operations are reconciled, completed checkpoints survive later failures, and SDK/runtime backup results preserve optional transferred-byte measurements. Prospective versions are StartOS 0.4.3, start-cli 3.0.0, and SDK 5.0.0 under the current fragment/version rules.

Closes #1441.

model: gpt-6.2-sol

Evidence

  • GitHub reported conflicts before the update. The branch now incorporates upstream e26e7ba169, uses the shared recovery password path for manual and automatic recovery, and applies both StartOS migrations at revision 5.
  • Added CLI entry points and MCP effect classifications for the backup operations. The regenerated bindings, MCP catalog, and four CLI manual exports passed the artifact check. The catalog retains all upstream tools.
  • Rust verification passed 2,090 start-core tests, 33 exver tests, three conversion worker tests, and 130 backup-filesystem tests. Formatting, the conflict-marker scan, changelog and version checks, both books, shell tests, Bash completions, and package CI and release tooling also passed.
  • Angular checks passed, including 378 StartOS UI tests. The TypeScript core passed 545 tests, the SDK passed 435 Jest tests and 63 Node tests, and the container runtime passed 43 tests and six snapshots. The five SDK consumer checkouts matched the 10 clean-upstream diagnostics against published SDK 4.1.0. Playwright saved a schedule and opened the restore picker in the mock UI.
  • GitHub verified the signed merge commit and reports it is mergeable. Maintainer review and approval to start fork workflows are required.
  • Deployed the full optimized StartOS 0.4.3 dev Debian package for 49e8a1ebb0cc9d53b3a6523d5982d0bc33a4722c to the disposable x86_64 test server. After reboot, the running commit, installed binaries, runtime image, and served UI assets matched the build. Migration revision 5 was applied and the existing schedule settings, 9 services, and 2 shared volumes were preserved. Both live capacity estimate commands and the new CLI help paths passed.
  • Follow-up f6512cb110 gives capacity estimates more room, keeps quantities with their units, aligns expanded figures, and uses the accordion outline. Verified with real mock values at 320, 375, and 1280 pixels. All 378 StartOS UI tests and the localization check passed.
  • f21e75e39261bb51ff26aaa66e88b9701133aeb0 carries the small-buffer pagination regression from 5613e7f375. All 131 standard backup-fs tests passed, including direct offset replay, and the mounted Linux getdents64 test reached end-of-directory with every entry listed once for each buffer size. StartOS formatting passed.
  • The optimized StartOS 0.4.3 dev package for this commit was deployed to the x86_64 test server. After reboot, the exact commit, installed daemon and backup helper, runtime image, and served capacity estimates bundle matched the build. The schedule, nine services, and two shared volumes were preserved, and both live capacity CLI paths passed.

Merge Danger

Door: one-way for confirmed checkpoint deletions; persisted metadata requires compatible tooling.

Blast Radius: server.

Retention permanently deletes the checkpoints confirmed by its preview. Scheduling, restore, service lifecycle, and target removal share the backup coordinator.

BeeJoe added 30 commits October 3, 2026 05:14
Let backup history accordion headers auto-size beyond Taiga's fixed control height, and render manual Toggle all with the same block and icon columns as service rows.
Reuse the scheduled-target credential fallback during restore so stale sealed credentials can be refreshed with the supplied password before work begins. Validate that selected checkpoints belong to the requested target instance.

Make backup cards, selectors, history, and technical details adapt to their containing panel from phone through desktop widths. Align template visibility, Taiga card usage, logical CSS properties, translations, and shared schedule validation with frontend standards.
Fold the start-cli and start-core contribution workflows into their AGENTS.md files, remove the redundant scoped guides, and repoint inbound documentation links as required by the repository migration policy.
Retain the newest 1,000 completed activities and automatic runs while preserving every in-progress entry. Prune existing oversized state during scheduler startup and use targeted PatchDB removals after completion.
Share schedule and schedule-list controls so the setup and management flows stay consistent. Translate composed summaries before interpolation and use Taiga loading and icon-button primitives. Keep restore checkpoint labels and selections readable on narrow screens.
Add explicit timezone selection and notify users for every scheduled-run failure. Move the backup editors to typed reactive forms and share the responsive retention-rule controls.
Keep no-service failure notification ownership in the pause path so one failed run emits one notification. Bind service selections to reactive controls, validate retained-history coverage before Review, clarify the validation error, and align the automatic-backup chevron with adjacent rows.
Disassociate every history owned by a schedule, including services that are no longer installed, when schedules are edited, reassigned, or deleted.

Consolidate schedule display helpers, align the retention editor with UI lifecycle and responsive conventions, and correct retention and capacity documentation.
Keep all automatic backup sources available to service restore. Apply System-checkpoint eligibility only in setup disk and network discovery, where full-server recovery requires it.

Export the eligibility field and cover both discovery policies with regression tests. The backend suite passes 557 tests; bindings, web and runtime type checks pass.
Preserve mounted retention and checkpoints when attaching existing locations, reject duplicate location ownership, and serialize history refresh with backup mutations. Require readable target metadata and confirm pruning against the actual target. Keep foreign restore discovery separate from local scheduling state.

Reuse capacity and manifest helpers, index history lookups, cache timezone options, and release progress subscriptions when a run or component ends. Update the backup book, changelog, and localized errors.

Validation: 562 backend tests; generated bindings and manpages; production builds; responsive backup UI checks from 320 to 1920 pixels.
Read schedule rows from live PatchDB state so changes from other sessions
update their status immediately. Preserve a target history policy when an
edit leaves the schedule retention settings unchanged.

Place schedule controls below details in narrow containers to keep names
readable. Update the backup guide and existing changelog entry.

Validated with live backup and restore tests, backend-driven UI state
changes, name-only and intentional retention edits, eight viewport sizes,
UI type checking, production UI build, formatting, and the StartOS book.
Reconcile local archive decisions before importing or changing target histories, including automatic backup runs. Preserve adopted retention settings when an empty history receives its first checkpoint.

Forward optional package backup output through the runtime while keeping void hooks compatible, and reset measurement availability for each SDK backup. Show checkpoint details before applying retention changes and use the shared task and translation flows.

Update product documentation and migrate container-runtime contributor guidance into AGENTS.md. Validated with backend, SDK, runtime and backup-fs tests, frontend checks, responsive browser checks, documentation builds, formatting and a full Debian package build.
Live testing found empty automatic histories displayed as ready to restore. Selecting one enabled Restore but submitted no checkpoint, producing a validation error. Restrict restore choices to services with saved checkpoints and align the restore documentation.

Validated with the live reproduction, UI type checking, production UI build, documentation build, formatting and whitespace checks.
Merge master while retaining automatic schedules and checkpoint recovery
alongside upstream conversion reservations, authenticated key wrapping,
trust migrations, and reactive target discovery. Reuse the shared key
wrapping primitive for unattended credentials and preserve legacy reads.

Select the next minor versions from published tags and pending fragments,
adopt compiled release highlights, and regenerate the bindings, MCP catalog,
and product man pages. Extend upstream fixtures for scheduled state and the
0.4.2 migration chain.
Preserve published migrations and add the 0.4.3 upgrade step after 0.4.2.1. Keep upstream boot-medium filtering and error handling while retaining automatic backup recovery and discovery. Refresh release versions, translations, bindings, and manuals.
Merge upstream/master through 34e0813. Use the registered target catalog,
pinned source mounts, and shared-volume-aware manual backup/restore flow while
preserving coordinated automatic checkpoints. Migrate legacy disk schedules and
saved unlock credentials to registered targets, and prevent target removal while
schedules reference it.

Keep upstream's paginated backup history API and expose automatic checkpoint
history under backup.checkpoint. Integrate schedule management and checkpoint
recovery into the new System backup pages, preserving manual volume selection.
Refresh generated APIs, man pages, translations, migration coverage, and docs
under the current repository guidance.
Integrate upstream/master while retaining automatic schedules, checkpoint
history and saved credentials alongside registry caches and server identity.
Keep upstream manual backup history without completion notifications, and
finish the corresponding automatic-backup activity record. Carry scheduled
recovery through encrypted setup RPC and preserve the 0.4.2.2 migration node.

Regenerate bindings, man pages and the MCP catalog. Validate all web apps,
production UI, SDK/runtime, books, release tooling and conflict regressions.
The full optimized native backend suite follows this merge commit.
The upstream port-reassignment tests construct raw PatchDB models. Public destructuring requires the scheduled-backup field even though deserialization supplies its default. Initialize that field so the ten binding regression tests run against the complete model.
Render one Add schedule action in the management page after loading so empty, single-schedule, and multi-schedule states share the same entry point. Keep the existing unsaved-change guard.

Increase shared card header and content padding, and preserve the form gap after the schedule editor header. Verify all web checks (510 tests), production UI builds, changelog versions, formatting, and mock browser flows at 320px, 390px, and desktop widths.
The fixed-height automatic backup header squeezed its title beside Manage schedules on small screens. Keep the action aligned with other right-side controls and let the header grow naturally with padded, wrapping content.

Verify all web checks (510 tests), formatting, StartOS fragment/version checks, and browser layouts at 320px, 390px, and desktop widths.
Integrate upstream through 52cdc8b.
Preserve upstream registry translations and shift automatic-backup IDs in
all five dictionaries, reusing the existing Custom translation.
Regenerate the conflicted registry CLI pages from the merged handlers.

The brochure registry recovery fixture supplied read-only storage, while
upstream now persists custom registry selections. Give it a writable store
and assert successful recovery and persistence.

Remove the stale shared-TS lint-staged override so the documented root
Prettier configuration owns the hook without legacy TSLint tasks or paths.

Verification: all web apps type-check and 526 web tests pass; TypeScript
core 511, SDK 394, runtime 43 plus 6 snapshots, SDK build tools 63, editor
docs 2, version library 33, release tooling 177, package CI 74. Three SDK
consumers gain no errors against 4.1.0. Production UI, setup wizard and
brochure builds, mobile 320px/390px backup flows, shell suites, books,
version checks and formatting pass.

Optimized native backend: 1,933 pass, 37 ignored, 10 export tests filtered.
All 3 conversion-worker lifecycle tests pass. Bindings and MCP catalog match the merged sources; all 4 man-page exports
pass. Normal-feature entry-point checks for StartOS, start-cli, registry
and tunnel pass against current embedded UI assets.
Combine activity and manual reports on the main Backups page while retaining older entries and full shared-volume reports. Remove the duplicate timeline from schedule management and preserve existing history links and filters.

Validation: npm run check; 284 UI tests; production UI build; mdBook build; changelog version check; desktop and mobile browser flows.
Integrate upstream through 362bbd1, including browser persistence, resumable database subscriptions, and the updated build and test workflow.

Preserve both translation sets with a unique sync-message ID. Keep capacity estimates below their heading with full-width service rows; the Taiga fieldset grid had placed them side by side. Exclude generated browser output from source formatting.
Integrate upstream through 795bf9b with live connection state, registry availability, and the malformed-registry storage stub.

Retain automatic backup activity counts and storage persistence assertions while adopting warning-only metrics and the upstream update count behavior. Allocate distinct IDs for the new translated registry messages.
Preserve scheduled-backup activity badges while adopting the upstream update visibility predicate and persistent server identity changes. Synchronize the runtime lockfile with the SDK security dependency floors.

Use a controlled clock for daemon timeout diagnostics so health polling assertions remain deterministic during loaded builds.
The MCP catalog is generated from TypeScript bindings. Including it in those bindings' input list invalidates the generator after each catalog refresh, even when all generated bytes are unchanged.

Exclude the derived catalog from binding inputs while preserving Rust source invalidation and all generated-artifact drift checks. Cover the dependency ordering with an isolated Make fixture.
Keep upstream rsync pruning and the transfer statistics used by scheduled backup reports. Run both 0.4.3 migrations at revision 2 so existing installations pick up the merged changes. Align generated registry help with its current product version.
Preserve scheduled backups alongside the public SSH key collection. Advance the combined 0.4.3 migration revision so test installations that already applied revision 2 move their SSH keys on the next boot.
Keep the legacy backup-target migration in its 0.4.3 version file under the updated contributor guidance. Advance the combined migration to revision 4 so existing feature and upstream installations apply the SSH-key and WireGuard changes.
Preserve scheduled-backup behavior and upstream translation IDs while regenerating the merged RPC, MCP, and CLI artifacts. Wait for the SDK health-check fixture commands so they cannot interfere with the next test after termination returns.
@MattDHill MattDHill added repo Repository maintenance start-registry labels Nov 25, 2026
Apply upstream password handling to automatic recovery and run both StartOS 0.4.3 migrations at revision 5. Expose scheduled backup commands in the CLI and classify their MCP effects under the updated repository guidance.

Regenerate the bindings, MCP tool catalog, and CLI manuals from the merged handlers.
Keep service summaries and expanded figures aligned on narrow screens, keep storage values with their units, and use the accordion border for each service card.
Exercise handler paging, intermediate and repeated directory cookies, and
kernel getdents64 buffers from 256 to 32768 bytes. Remove unused Request
arguments from internal directory handlers to test the real implementation
without fabricating FUSE requests.

An older deployed helper restarted listings when small readers resumed
inside a reply. The older upstream algorithm remembered only its final
cookie and consumed it on lookup; replaying that implementation fails both
regressions. This branch already retains every cookie, and a fresh helper
build resolves the mixed-artifact deployment's backup finalization loop.

Verified 131 non-mount tests, 64 FUSE tests, both musl regressions, and a
native scoped backup and uninstall/restore with matching watch and snapshot
fingerprints. The verified helper also survives an image upgrade and reboot.

(cherry picked from commit 5613e7f)

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat]: automated backups

4 participants