Skip to content

feat: Add LXC container backup functionality#331

Merged
michelroegl-brunner merged 10 commits intomainfrom
feat/lxc_backups
Nov 18, 2025
Merged

feat: Add LXC container backup functionality#331
michelroegl-brunner merged 10 commits intomainfrom
feat/lxc_backups

Conversation

@michelroegl-brunner
Copy link
Copy Markdown
Member

Summary

This PR adds comprehensive backup functionality for LXC containers.

Features

  • 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)

Technical Details

  • Uses vzdump command via SSH for backups
  • Parses Proxmox storage configuration to identify backup-capable storages
  • Implements in-memory caching for storage lists
  • Sequential execution of backup then update via WebSocket
  • Real-time progress display in terminal component

- 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
@michelroegl-brunner michelroegl-brunner merged commit fe6cca5 into main Nov 18, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant