Skip to content

Full device backup and restore - #183

Open
dirwin31 wants to merge 4 commits into
firestar5683:Domfrom
dirwin31:FullBackup
Open

dirwin31 wants to merge 4 commits into
firestar5683:Domfrom
dirwin31:FullBackup

Conversation

@dirwin31

@dirwin31 dirwin31 commented Sep 19, 2026 •

Copy link
Copy Markdown

Inspired by AngusBell97 and cherry picked work from Closed By Owner PR142

Summary:
Adds a Full Backup section to System Tools
Allow you to save your entire StarPilot setup to a file and restore it later on the same device, even after reinstalling, resetting, or switching forks.

Changes:

  • Allows you to save device state as a zip file.
  • Saves: settings profiles and toggle backups, FLM tunings and workspace, themes, calibration/learned tuning, driving stats, installed model list.
  • Not saved: model files, API keys/accounts/credentials, Galaxy pairing and device identity, saved nav destinations, Wi-Fi/Bluetooth settings, driving recordings, offline maps, branch/OS.
  • Reboot tracking now knows why the device is rebooting - from an update or from a restore
  • Export and import are governed by device_backup_keys.json, which classifies every persistent Param as include or exclude; a test fails when a new Param is not classified. Credentials, pairing, navigation history, recordings, and model binaries are never included.
  • Restores validate the archive and checksums, budget disk space, snapshot what they replace, and roll back from a recovery record on failure or interruption; Galaxy rolls back an interrupted restore at startup once parked.
  • Saved models are re-downloaded through Model Manager after a restore, with an option to avoid downloading.
  • Failed model download always releases its gate so it cannot strand later downloads or the restore flow.

Dependency: This branch builds on the update-page changes in #159

Verification:

  • Device backup: 65 passed (test_device_backup.py)
  • Backup restore integration: passed (test_device_backup_integration.py)
  • Model re-download after restore: passed (test_restore_models.py)
  • Mobile UI/System Tools front-end: passed (test_ui_vue_frontend.py)
  • Failed-download recovery: 7 passed (test_download_failure_recovery.py)
  • Backup restore UI (node): passed (test_device_backup_frontend.cjs)
  • Update/branch selector (node): 30 passed (test_branch_selector.mjs)
  • Combined targeted run: 137 passed, 0 failed

dirwin31 and others added 3 commits September 22, 2026 16:16
Back up Galaxy settings, the FLM workspace, themes, saved profiles, and the
installed-model inventory into a portable ZIP, then restore it on the same
device after reinstalling or switching forks.

- Export and import are governed by device_backup_keys.json, which classifies
  every persistent Param as include or exclude; a test fails when a new Param is
  not classified. Credentials, pairing, navigation history, recordings, and
  model binaries are never included.
- Restores validate the archive and checksums, budget disk space, snapshot what
  they replace, and roll back from a recovery record on failure or interruption;
  Galaxy rolls back an interrupted restore at startup once parked.
- Saved models are re-downloaded through Model Manager after a restore, then the
  device reboots, with an option to reboot without downloading.
- A failed model download always releases its gate so it cannot strand later
  downloads or the restore flow.

Co-authored-by: AngusBell97 <124716116+AngusBell97@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant