Skip to content

Comments

Add manual backup creation and delete buttons to Update Manager#1255

Open
Sebbeben wants to merge 5 commits intoPart-DB:masterfrom
Sebbeben:feature/update-manager-improvements
Open

Add manual backup creation and delete buttons to Update Manager#1255
Sebbeben wants to merge 5 commits intoPart-DB:masterfrom
Sebbeben:feature/update-manager-improvements

Conversation

@Sebbeben
Copy link
Contributor

@Sebbeben Sebbeben commented Feb 17, 2026

Summary

Adds backup management buttons to the Update Manager and improves Docker support:

  • "Create Backup" button in the backups tab for on-demand backups
  • Download button for each backup — essential for Docker users since var/backups/ is not a persistent volume
  • Trash icon delete buttons for update logs and backup files
  • Docker support: Backup creation and restore are now available for all installation types, not just git-based installs
  • Docker warning: Info banner when Docker is detected, advising to download backups or mount var/backups/
  • SQLite restore fix: Restore now uses the actual configured DATABASE_URL path instead of hardcoded var/app.db (fixes restore for Docker's default uploads/app.db and any custom SQLite path)
  • New controller routes with CSRF protection and @system.manage_updates permission checks
  • Uses data-turbo-confirm for CSP-safe confirmation dialogs (no inline JS)

Changes

File What changed
UpdateManagerController.php Added InstallationTypeDetector, download endpoint, pass is_docker to template
BackupManager.php Fixed SQLite restore to use Doctrine's configured path
index.html.twig Decoupled backup/restore from can_auto_update, added download button, Docker warning
messages.en.xlf Added translation strings for download button and Docker warning

Testing done

  • Navigated to Update Manager → Backups tab
  • Clicked "Create Backup" → confirm dialog appeared → backup created and listed
  • Clicked download icon → backup ZIP downloaded
  • Clicked trash icon on a backup → confirm dialog → backup deleted
  • Navigated to Logs tab → clicked trash icon → log deleted
  • Verified buttons only appear for users with @system.manage_updates permission
  • Verified no CSP console errors

- Add "Create Backup" button in the backups tab for on-demand backups
- Add delete buttons (trash icons) for update logs and backups
- New controller routes with CSRF protection and permission checks
- Use data-turbo-confirm for CSP-safe confirmation dialogs
- Add deleteLog() method to UpdateExecutor with filename validation
@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

❌ Patch coverage is 52.54237% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.30%. Comparing base (70cde4c) to head (9a82359).

Files with missing lines Patch % Lines
src/Controller/UpdateManagerController.php 50.00% 21 Missing ⚠️
src/Services/System/BackupManager.php 0.00% 4 Missing ⚠️
src/Services/System/UpdateExecutor.php 76.92% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1255      +/-   ##
============================================
+ Coverage     54.77%   55.30%   +0.52%     
- Complexity     8012     8030      +18     
============================================
  Files           601      601              
  Lines         25690    25745      +55     
============================================
+ Hits          14072    14237     +165     
+ Misses        11618    11508     -110     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…ple from auto-update

- Decouple backup creation/restore UI from can_auto_update so Docker
  and other non-git installations can use backup features
- Add backup download endpoint for saving backups externally
- Fix SQLite restore to use configured DATABASE_URL path instead of
  hardcoded var/app.db (affects Docker and custom SQLite paths)
- Show Docker-specific warning about var/backups/ not being persisted
- Pass is_docker flag to template via InstallationTypeDetector
- Controller tests: auth, CSRF validation, 404 for missing backups, restore disabled check
- UpdateExecutor: deleteLog validation, non-existent file, successful deletion
- BackupManager: deleteBackup validation for missing/non-zip files
@Sebbeben Sebbeben mentioned this pull request Feb 20, 2026
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