[SOLVED] Snapshot lock error

Jul 20, 2022
133
10
18
I am running PVE and using PBS to back up the PVE host system. At the present time, I am not trying to back up the guests as I have legacy backup solutions for them.

I describe the problem in detail below. My question is, what is causing this error, and how do I correct it?

Thanks!



I have a simple script that simply invokes proxmox-backup-client three times, each sending a different set of data to the same data store. The first invocation seems to work well. However, the second and third invocations get this message:

Error: unable to acquire lock on snapshot directory "/datastore/<redacted>" - base snapshot is already locked by another operation

Here is the script:
Code:
proxmox-backup-client backup root.pxar:/ --repository root@pam@192.168.1.37:8007:PVEHypervisor
proxmox-backup-client backup boot-efi.pxar:/boot/efi --repository root@pam@192.168.1.37:8007:PVEHypervisor
proxmox-backup-client backup etc-pve.pxar:/etc/pve --repository root@pam@192.168.1.37:8007:PVEHypervisor

Here are the resulting messages:
Code:
root@leghorn:~# ./pbsbackup
Starting backup: host/leghorn/2022-08-02T22:40:26Z
Client name: leghorn
Starting backup protocol: Tue Aug  2 18:40:26 2022
Downloading previous manifest (Tue Aug  2 18:38:56 2022)
Upload directory '/' to 'root@pam@192.168.1.37:8007:PVEHypervisor' as root.pxar.didx
skipping mount point: "boot/efi"
skipping mount point: "dev"
skipping mount point: "etc/pve"
skipping mount point: "proc"
skipping mount point: "run"
skipping mount point: "sys"
skipping mount point: "var/lib/lxcfs"
root.pxar: had to backup 40.401 MiB of 11.043 GiB (compressed 10.276 MiB) in 20.72s
root.pxar: average backup speed: 1.949 MiB/s
root.pxar: backup was done incrementally, reused 11.004 GiB (99.6%)
Uploaded backup catalog (1.191 MiB)
Duration: 20.75s
End Time: Tue Aug  2 18:40:46 2022
Starting backup: host/leghorn/2022-08-02T22:40:56Z
Client name: leghorn
Starting backup protocol: Tue Aug  2 18:40:56 2022
Error: unable to acquire lock on snapshot directory "/datastore/<redacted>/2022-08-02T22:40:26Z" - base snapshot is already locked by another operation
Starting backup: host/leghorn/2022-08-02T22:41:06Z
Client name: leghorn
Starting backup protocol: Tue Aug  2 18:41:06 2022
Error: unable to acquire lock on snapshot directory "/datastore/<redacted>/2022-08-02T22:40:26Z" - base snapshot is already locked by another operation

The Content screen shows that all three invocations worked at first. But now, only the first one appears. All the backups are verified and can be browsed.

Screenshot from 2022-08-02 19-07-34.png
 
Hi,
do you have the Verify New option active for the datastore? I'd recommend specifying a unique --backup-id for each of the three invocations. This makes it clear that they are backups of different things. And I'm hoping it might avoid your issue at the same time, please give it a try. EDIT: better suggestion by @fabian below :)
 
Last edited:
  • Like
Reactions: EllyMae
alternatively, you could create all three pxar archives in one go ;)

proxmox-backup-client backup root.pxar:/ boot-efi.pxar:/boot/efi etc-pve.pxar:/etc/pve --repository root@pam@192.168.1.37:8007:PVEHypervisor

that way incremental backups would also work properly and you won't run into the verify new locking issue either.
 

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!