From e853bc0d9c01de7116a7e6ec23b99f6873e0f7d8 Mon Sep 17 00:00:00 2001 From: Pulse Monitor Date: Sat, 6 Sep 2025 10:43:28 +0000 Subject: [PATCH] debug: add logging to diagnose PMG backup detection issue #359 Added console.log statements to understand why PMG backups with VMID=0 are still showing as LXC in v4.14.0. This will help identify: - What data type vmid is (string vs number) - What backup type is being sent - Whether the checks are being triggered --- .../src/components/Backups/UnifiedBackups.tsx | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/frontend-modern/src/components/Backups/UnifiedBackups.tsx b/frontend-modern/src/components/Backups/UnifiedBackups.tsx index 101f712ea..73c319ec4 100644 --- a/frontend-modern/src/components/Backups/UnifiedBackups.tsx +++ b/frontend-modern/src/components/Backups/UnifiedBackups.tsx @@ -200,6 +200,18 @@ const UnifiedBackups: Component = () => { // Determine the display type based on VMID and backup type // VMID 0 = host config backup (e.g. PMG) let displayType: GuestType; + + // Debug logging for PMG backup detection + if (backup.vmid === '0' || backup.vmid === 0 || parseInt(backup.vmid) === 0) { + console.log('PBS backup with VMID=0 detected:', { + vmid: backup.vmid, + vmidType: typeof backup.vmid, + backupType: backup.backupType, + instance: backup.instance, + comment: backup.comment + }); + } + if (parseInt(backup.vmid) === 0 || backup.backupType === 'host') { displayType = 'Host'; } else if (backup.backupType === 'vm' || backup.backupType === 'VM') { @@ -255,6 +267,19 @@ const UnifiedBackups: Component = () => { // Determine the display type based on backup.type and VMID let displayType: GuestType; + + // Debug logging for PMG backup detection in storage backups + if (backup.vmid === 0) { + console.log('Storage backup with VMID=0 detected:', { + vmid: backup.vmid, + vmidType: typeof backup.vmid, + type: backup.type, + volid: backup.volid, + notes: backup.notes, + storage: backup.storage + }); + } + // Check for host backups - VMID 0 or type 'host' (for PMG/PVE host configs) if (backup.vmid === 0 || backup.type === 'host') { displayType = 'Host';