Add LXC container backup functionality

- 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)
This commit is contained in:
Michel Roegl-Brunner
2025-11-14 10:30:27 +01:00
parent 4ea49be97d
commit d50ea55e6d
4 changed files with 173 additions and 136 deletions

View File

@@ -4,7 +4,6 @@ import { getDatabase } from "~/server/database-prisma";
import { createHash } from "crypto";
import type { Server } from "~/types/server";
import { getStorageService } from "~/server/services/storageService";
import { SSHService } from "~/server/ssh-service";
// Helper function to parse raw LXC config into structured data
function parseRawConfig(rawConfig: string): any {
@@ -2063,6 +2062,7 @@ EOFCONFIG`;
}
const storageService = getStorageService();
const { default: SSHService } = await import('~/server/ssh-service');
const sshService = new SSHService();
// Test SSH connection first
@@ -2118,6 +2118,7 @@ EOFCONFIG`;
};
}
const { default: SSHService } = await import('~/server/ssh-service');
const sshService = new SSHService();
// Test SSH connection first