abbbi / virtnbdbackup

Backup utility for Libvirt / qemu / kvm supporting incremental and differential backups + instant recovery (agentless).
http://libvirtbackup.grinser.de/
GNU General Public License v3.0
330 stars 46 forks source link

Issues with transient VM's: TypeError: 'list' object cannot be interpreted as an integer #122

Closed abbbi closed 1 year ago

abbbi commented 1 year ago

Discussed in https://github.com/abbbi/virtnbdbackup/discussions/121

Originally posted by **CJBecker** August 1, 2023 Hi, I was seeing that you can set transient vms: (https://github.com/abbbi/virtnbdbackup#transient-virtual-machines-checkpoint-persistency) Using this process and setting the checkpoints, the next backup after a VM move appears to attempt to restore checkpoint but fails: ``` [2023-07-31 20:16:19] INFO root checkpoint - redefine [MainThread]: Loading checkpoint list from: [**********] [2023-07-31 20:16:19] INFO root checkpoint - redefine [MainThread]: Redefine missing checkpoint: [virtnbdbackup.0] Traceback (most recent call last): File "/usr/bin/virtnbdbackup", line 796, in main() File "/usr/bin/virtnbdbackup", line 427, in main checkpoint.create(args, domObj) File "/usr/local/lib/python3.10/dist-packages/virtnbdbackup-1.9.31-py3.10.egg/libvirtnbdbackup/virt/checkpoint.py", line 287, in create File "/usr/local/lib/python3.10/dist-packages/virtnbdbackup-1.9.31-py3.10.egg/libvirtnbdbackup/virt/checkpoint.py", line 225, in redefine File "/usr/lib/python3/dist-packages/libvirt.py", line 1267, in checkpointCreateXML ret = libvirtmod.virDomainCheckpointCreateXML(self._o, xmlDesc, flags) TypeError: 'list' object cannot be interpreted as an integer ```
abbbi commented 1 year ago

@CJBecker can you confirm this commit fixes the issue?:

https://github.com/abbbi/virtnbdbackup/commit/beeeb952e720e6361c0f669cb555c45a98988317

works for me with the latest change:

[2023-08-01 17:02:15] INFO root virtnbdbackup - main [MainThread]: Concurrent backup processes: [1] [2023-08-01 17:02:15] INFO root checkpoint - redefine [MainThread]: Loading checkpoint list from: [/tmp/checkpoints] [2023-08-01 17:02:15] INFO root checkpoint - redefine [MainThread]: Redefine missing checkpoint: [virtnbdbackup.0] [2023-08-01 17:02:15] INFO root checkpoint - create [MainThread]: Checkpoint handling. [2023-08-01 17:02:15] INFO root checkpoint - create [MainThread]: Next checkpoint id: [1]. [2023-08-01 17:02:15] INFO root checkpoint - create [MainThread]: Parent checkpoint name [virtnbdbackup.0]. [2023-08-01 17:02:15] INFO root checkpoint - create [MainThread]: Using checkpoint name: [virtnbdbackup.1].

CJBecker commented 1 year ago

LGTM TY TY

abbbi commented 1 year ago

fixed in latest release, added test for CI so things dont break again. thanks