Feat/restore from sqlite backup - #1
Merged
Merged
Conversation
adarshdigievo
commented
Oct 1, 2026
Member
- Add restore option from SQLite backups
- Add DB storage stats and a cleanup option in settings
…d cleanup option in settings
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Restore validation can create an unusable account, and deletion notices can inaccurately attribute naturally absent responses.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Adds SQLite backup restoration and storage management, including cleanup controls and omission notices.
Changes:
- Adds validated, concurrency-safe backup restoration.
- Adds storage metrics, cleanup APIs, and settings UI.
- Adds tests, documentation, and a 1.0.0 version bump.
| File | Description |
|---|---|
uv.lock |
Updates package version. |
tests/test_storage.py |
Tests storage metrics and cleanup. |
tests/test_storage_browser.py |
Tests storage UI workflows. |
tests/test_backups.py |
Tests backup and restore behavior. |
tests/test_backups_browser.py |
Tests restore UI workflows. |
src/apptrail/worker.py |
Enables worker restart after maintenance. |
src/apptrail/storage.py |
Implements usage measurement and cleanup. |
src/apptrail/static/style.css |
Styles storage and restore controls. |
src/apptrail/static/insights-ui.js |
Displays image omission notices. |
src/apptrail/static/auth.js |
Adds setup-time restoration. |
src/apptrail/static/auth.html |
Adds the setup restore form. |
src/apptrail/static/auth.css |
Styles setup restore controls. |
src/apptrail/static/app.js |
Adds settings storage and restore UI. |
src/apptrail/listing_history.py |
Reports missing historical assets. |
src/apptrail/db.py |
Adds compact backups and DB replacement. |
src/apptrail/backups.py |
Validates and stages uploaded backups. |
src/apptrail/auth.py |
Authorizes setup restoration uploads. |
src/apptrail/api.py |
Exposes storage and restore endpoints. |
src/apptrail/__init__.py |
Bumps runtime version. |
README.md |
Documents compact backup behavior. |
pyproject.toml |
Bumps project version. |
docs/SELF_HOSTING.md |
Documents persistence, cleanup, and restoration. |
docs/DEVELOPMENT.md |
Documents implementation and release details. |
docs/AUTHENTICATION.md |
Documents restore authorization and sessions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

