From e8852ecae7be3e9ec3163bb0eb1de8b0d6defcf6 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 18 Nov 2025 09:22:13 +0100 Subject: [PATCH] docs: add LXC Backups section to help modal --- src/app/_components/HelpModal.tsx | 143 +++++++++++++++++++++++++++++- 1 file changed, 141 insertions(+), 2 deletions(-) diff --git a/src/app/_components/HelpModal.tsx b/src/app/_components/HelpModal.tsx index 871ceed..7d0f84e 100644 --- a/src/app/_components/HelpModal.tsx +++ b/src/app/_components/HelpModal.tsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import { Button } from './ui/button'; -import { HelpCircle, Server, Settings, RefreshCw, Clock, Package, HardDrive, FolderOpen, Search, Download, Lock, GitBranch } from 'lucide-react'; +import { HelpCircle, Server, Settings, RefreshCw, Clock, Package, HardDrive, FolderOpen, Search, Download, Lock, GitBranch, Archive } from 'lucide-react'; import { useRegisterModal } from './modal/ModalStackProvider'; interface HelpModalProps { @@ -11,7 +11,7 @@ interface HelpModalProps { initialSection?: string; } -type HelpSection = 'server-settings' | 'general-settings' | 'auth-settings' | 'sync-button' | 'auto-sync' | 'available-scripts' | 'downloaded-scripts' | 'installed-scripts' | 'lxc-settings' | 'update-system' | 'repositories'; +type HelpSection = 'server-settings' | 'general-settings' | 'auth-settings' | 'sync-button' | 'auto-sync' | 'available-scripts' | 'downloaded-scripts' | 'installed-scripts' | 'lxc-settings' | 'update-system' | 'repositories' | 'backups'; export function HelpModal({ isOpen, onClose, initialSection = 'server-settings' }: HelpModalProps) { useRegisterModal(isOpen, { id: 'help-modal', allowEscape: true, onClose }); @@ -30,6 +30,7 @@ export function HelpModal({ isOpen, onClose, initialSection = 'server-settings' { id: 'downloaded-scripts' as HelpSection, label: 'Downloaded Scripts', icon: HardDrive }, { id: 'installed-scripts' as HelpSection, label: 'Installed Scripts', icon: FolderOpen }, { id: 'lxc-settings' as HelpSection, label: 'LXC Settings', icon: Settings }, + { id: 'backups' as HelpSection, label: 'LXC Backups', icon: Archive }, { id: 'update-system' as HelpSection, label: 'Update System', icon: Download }, ]; @@ -925,6 +926,144 @@ export function HelpModal({ isOpen, onClose, initialSection = 'server-settings' ); + case 'backups': + return ( +
+
+

LXC Backups

+

+ Create backups of your LXC containers before updates or on-demand. Backups are created using Proxmox VE's built-in backup system and can be stored on any backup-capable storage. +

+
+ +
+
+

Overview

+

+ The backup feature allows you to create snapshots of your LXC containers before performing updates or at any time. Backups are created using the vzdump command via SSH and stored on your configured Proxmox storage. +

+
    +
  • Pre-Update Backups: Automatically create backups before updating containers
  • +
  • Standalone Backups: Create backups on-demand from the Actions menu
  • +
  • Storage Selection: Choose from available backup-capable storages
  • +
  • Real-Time Progress: View backup progress in the terminal output
  • +
+
+ +
+

Backup Before Update

+

+ When updating an LXC container, you can choose to create a backup first: +

+
    +
  1. Click the "Update" button for an installed script
  2. +
  3. Confirm that you want to update the container
  4. +
  5. Choose whether to create a backup before updating
  6. +
  7. If yes, select a backup-capable storage from the list
  8. +
  9. The backup will be created, then the update will proceed automatically
  10. +
+
+
Backup Failure Handling
+

+ If a backup fails, you'll be warned but can still choose to proceed with the update. This ensures updates aren't blocked by backup issues. +

+
+
+ +
+

Standalone Backup

+

+ Create a backup at any time without updating: +

+
    +
  1. Open the Actions dropdown menu for an installed script
  2. +
  3. Click "Backup"
  4. +
  5. Select a backup-capable storage from the list
  6. +
  7. Watch the backup progress in the terminal output
  8. +
+

+ Note: Standalone backups are only available for SSH-enabled scripts with valid container IDs. +

+
+ +
+

Storage Selection

+

+ The system automatically discovers backup-capable storages from your Proxmox servers: +

+
    +
  • Automatic Discovery: Storages are fetched from /etc/pve/storage.cfg on each server
  • +
  • Backup-Capable Only: Only storages with "backup" in their content are shown
  • +
  • Cached Results: Storage lists are cached for 1 hour to improve performance
  • +
  • Manual Refresh: Use the "Fetch Storages" button to refresh the list if needed
  • +
+
+
Storage Types
+
    +
  • Local: Backups stored on the Proxmox host
  • +
  • Storage: Network-attached storage (NFS, CIFS, etc.)
  • +
  • PBS: Proxmox Backup Server storage
  • +
+
+
+ +
+

Viewing Available Storages

+

+ You can view all storages for a server, including which ones support backups: +

+
    +
  1. Go to the Server Settings section
  2. +
  3. Find the server you want to check
  4. +
  5. Click the "View Storages" button (database icon)
  6. +
  7. See all storages with backup-capable ones highlighted
  8. +
+

+ This helps you identify which storages are available for backups before starting a backup operation. +

+
+ +
+

Backup Process

+

+ When a backup is initiated, the following happens: +

+
    +
  • SSH Connection: Connects to the Proxmox server via SSH
  • +
  • Command Execution: Runs vzdump <CTID> --storage <STORAGE> --mode snapshot
  • +
  • Real-Time Output: Backup progress is streamed to the terminal
  • +
  • Completion: Backup completes and shows success/failure status
  • +
  • Sequential Execution: If part of update flow, update proceeds after backup completes
  • +
+
+ +
+

⚠️ Important Notes

+
    +
  • Storage Requirements: Ensure you have sufficient storage space for backups
  • +
  • Backup Duration: Backup time depends on container size and storage speed
  • +
  • Snapshot Mode: Backups use snapshot mode, which requires sufficient disk space
  • +
  • SSH Access: Backups require valid SSH credentials configured for the server
  • +
  • Container State: Containers can be running or stopped during backup
  • +
+
+ +
+

Backup Storage Cache

+

+ Storage information is cached to improve performance: +

+
    +
  • Cache Duration: Storage lists are cached for 1 hour
  • +
  • Automatic Refresh: Cache expires and refreshes automatically
  • +
  • Manual Refresh: Use "Fetch Storages" button to force refresh
  • +
  • Per-Server Cache: Each server has its own cached storage list
  • +
+
+
+
+ ); + default: return null; }