(Resolved) Purge backup does not remove VM from Datacenter backup list

GarrettB

Well-Known Member
Jun 4, 2018
105
15
58
Hello thank you for you the great ongoing work! I got an error during backups:
Use of uninitialized value $node in hash element at /usr/share/perl5/PVE/VZDump.pm line 1197

The VM was recently removed and its backup purged. However, it still remained on the scheduled backup list. I don't recall this behavior in the past, but I possibly did only remove/purge on a VM not on the backup list. Is this a bug or is it expected to be remove from the list when VM is removed?

Then, I could not edit the VM from the backup list because it no longer exixts - I deleted the backup task and re-added. I am ok and no problems after this step. I just wanted to check it out with you as well.
 
Since the backup plan of a particular VM is just it's number in /etc/pve/vzdump.cron, I guess this is normal behaviour.
 
@ph0x But if the adding of the VM to the vzdump.cron is possible via GUI, then possibly the removal of it might be expected via GUI initiated action as well. Just wondering if there is supposed to a be a hook for removal that isn't working.
 
I just took a test and there is indeed a hook. Backup plans, even mixed ones, get updated properly upon deletion of a VM.
 
That's interesting to know. I must have another problem then...because as I attempted to restore a VM850 backup to a VM120 id to try to also test...120 being the one I had issues with...I got this error:
1602941553884.png

In the GUI, neither the backups or images lists are showing a 120.

The node Search list also does not show a 120. And, the Datacenter Search list does not show a 120.

In the shell I searched for file that would have this message:
grep -rnw PVE -e 'already exists on node'
PVE/Cluster.pm:747: die "$vmtypestr $vmid already exists on node '$d->{node}'\n";

And, in Syslog I now notice this error is simultaneous with the error message:
Oct 17 09:42:23 pve pvedaemon[19168]: Use of uninitialized value in string eq at /usr/share/perl5/PVE/Cluster.pm line 746.
Oct 17 09:42:23 pve pvedaemon[19168]: Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/PVE/Cluster.pm line 747.

And this is when I go get my coffee...
 
Hi,
if you don't use purge when removing a VM, the backup configuration doesn't get updated. And thanks for reporting the perl warnings! I can reproduce the first one (in VZDump.pm).

Regarding the second (and third) one, could you post the ouput of the following:
Code:
pvesh get cluster/resources
ls /etc/pve/nodes/*/qemu-server
ls /etc/pve/nodes/*/lxc
Does ID 120 show up anywhere?
 
  • Like
Reactions: ph0x
Does ID 120 show up anywhere?
It does not show up in any of those folders. I have also searched for file content of "120" which does return a few things, but nothing in the context we are looking for.

However, I tried to restore to id 120 again this morning and it was permitted without error. Maybe a scheduled cleanup occurred since the last attempt? Everything seems fine now.

¯\_(ツ)_/¯
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!