feat: Add LXC container backup functionality#331
Merged
michelroegl-brunner merged 10 commits intomainfrom Nov 18, 2025
Merged
Conversation
- Add backup capability before updates or as standalone action - Implement storage service to fetch and parse backup-capable storages from PVE nodes - Add backup storage selection modal for user choice - Support backup+update flow with sequential execution - Add standalone backup option in Actions menu - Add storage viewer in server section to show available storages - Parse /etc/pve/storage.cfg to identify backup-capable storages - Cache storage data for performance - Handle backup failures gracefully (warn but allow update to proceed)
- Add Backup model to Prisma schema with fields for container_id, server_id, hostname, backup info - Create backupService with discovery methods for local (/var/lib/vz/dump/) and storage (/mnt/pve/<storage>/dump/) backups - Add database methods for backup CRUD operations and grouping by container - Create backupsRouter with getAllBackupsGrouped and discoverBackups procedures - Add BackupsTab component with collapsible cards grouped by CT_ID and hostname - Integrate backups tab into main page navigation - Filter storages by node hostname matching to only show applicable storages - Skip PBS backups discovery (temporarily disabled) - Add comprehensive logging for backup discovery process
- Add PBSStorageCredential model to database schema (fingerprint now required) - Create PBS credentials API router with CRUD operations - Add PBS login functionality to backup service before discovery - Create PBSCredentialsModal component for managing credentials - Integrate PBS credentials management into ServerStoragesModal - Update storage service to extract PBS IP and datastore info - Add helpful hint about finding fingerprint on PBS dashboard - Auto-accept fingerprint during login using stored credentials
- Fix PBS login to use PBS_PASSWORD environment variable instead of stdin - Change backup discovery command from 'snapshots host/<CT_ID>' to 'snapshot list ct/<CT_ID>' - Use full repository string (root@pam@IP:DATASTORE) instead of storage name - Parse table format output correctly (snapshot | size | files) - Extract snapshot name, size, and date from table output - Convert size units (MiB/GiB) to bytes for storage - Fix TypeScript errors with proper null checks
- Add restore.log file writing in restoreService.ts for progress tracking - Create getRestoreProgress query endpoint for polling restore logs - Implement polling-based progress updates in BackupsTab (1 second interval) - Update LoadingModal to display all progress logs with auto-scroll - Remove console.log debug output from restoreService - Add static 'Restore in progress' text under spinner - Show success checkmark when restore completes - Prevent modal dismissal during restore, allow ESC/X button when complete - Remove step prefixes from log messages for cleaner output - Keep success/error modals open until user dismisses manually
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.
Summary
This PR adds comprehensive backup functionality for LXC containers.
Features
Technical Details
vzdumpcommand via SSH for backups