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": "UPIDbs3: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:
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?
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": "UPIDbs3: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:
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?