Parallel restoring

maximmonin

New Member
Dec 9, 2023
5
1
3
We use PBS as backup server for our VMs and as restoring tool, by using: snapshot map/snapshot partition mount/extract data from mounted partition.
This algorithm works as additional extractor api, called by client requests to restore some backup data.

Everything works fine except few moments:
1. There is sometimes EBUSY errors, when 2 clients trying to parallel map 2 different snapshots.
2. Every snapshot can be mapped only once.
3. PBS api do not have method to get device for already mapped snapshots (/dev/loop0 as example). We have only this:
```json
{
"upid": "UPID:pbs3:00000CEA:00000598:00001A8B:65732AAB:reader:storage\\x3avm-524-6570FE9F:sync@pbs:",
"node": "localhost",
"pid": 3306,
"pstart": 1432,
"starttime": 1702046379,
"worker_type": "reader",
"worker_id": "storage:vm/524/6570FE9F",
"user": "sync@pbs",
"datastore": "storage",
"snapshot": "vm/524/2023-12-06T23:07:11Z"
}
```
We bypassing this issue by using this algorithm:
SnapshotMount.jpg
But we still experience some random issue with PBS, bacause restoring tool is not the only process, which maps snapshots. For example PBS sync process do it too, and other processes also. And we cannot control when this process upmaps snapshot.
Is there any idea?
 

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!