feat: Download a backup of the gallery - #81
Merged
Conversation
The README tells people to back up before updating without giving them a way to do it, which leaves copying docker volumes by hand as the only option. `GET /api/backup` returns a zip holding the uploads and the database, and settings has a button for it. The database goes through sqlite's own backup API rather than a file copy, so the archive holds a consistent snapshot even if the app is being used while it is taken. The archive is built in a temporary directory that is removed once the response has been sent, whether or not it succeeded. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
mrtncode
approved these changes
Aug 12, 2026
Owner
|
Thanks! |
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.
The README asks people to back up before updating but gives them no way to do it, so the only option is copying docker volumes by hand.
GET /api/backupreturns a zip holding the uploads and the database, with a button for it in settings.Two details worth the review:
after_this_request, whether the response succeeded or not — one test asserts nothing is left behind.2 tests added, 27 pass. Frontend typechecks and builds.
Independent of #72–#80. Note it adds its own Backup card in settings while #80 adds a Library card; if you take both, they are two adjacent cards — happy to merge them into one on whichever lands second.
🤖 Generated with Claude Code