RESTful knowledge exchange
Post Reply
juan.madriaga
Novice
Posts: 4
Liked: never
Joined: Jul 21, 2022 8:41 pm
Full Name: Pablo Madriaga
Contact:

restore sql from Enterprise Manager API

Post by juan.madriaga »

Hello people, I would like to know if I started to make the script correctly. I am working with the Enterprise Manager API. What I want to do is get the sql restorepoints from a particular vm and then perform the sql restore on another vm.

What I do is the following:
With python I get some restore points, before choosing one, I do this with the following query:

Code: Select all

url = f"https://{address}:9398/api/query?type=VmRestorePoint&format=Entities&sortDesc=CreationTime&pageSize={size}&page=1&filter=VmDisplayName=={vm}"
With this I get information and I can manipulate with python. How should I perform the restore? Can it be done with this same API?
oleg.feoktistov
Veeam Software
Posts: 1918
Liked: 636 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: restore sql from Enterprise Manager API

Post by oleg.feoktistov »

Hi Pablo,

Though you can get some info about backed up sql databases inside a restore point, restores for application items (SQL, Oracle etc.) are not yet available through EM REST API. We have plans to implement them in one of vNext versions.

Thanks,
Oleg
juan.madriaga
Novice
Posts: 4
Liked: never
Joined: Jul 21, 2022 8:41 pm
Full Name: Pablo Madriaga
Contact:

Re: restore sql from Enterprise Manager API

Post by juan.madriaga »

From the Enterprise Manager api I get the following data:
$response.QueryResult.Entities.VmRestorePoints.VmRestorePoint

Code: Select all

Href            : https://EM:port/api/vmRestorePoints/e8c5d821-bae3-4859-86fd-47694a2d6603?format=Entity
Type            : VmRestorePoint
Name            : VM@2022-08-19 09:05:45
UID             : urn:veeam:VmRestorePoint:e8c5d821-bae3-4859-86fd-47694a2d6603
VmDisplayName   : VM
Links           : Links
CreationTimeUTC : 2022-08-19T09:05:45.73Z
VmName          : VM
Algorithm       : Full
PointType       : Full
HierarchyObjRef : urn:VMware:Vm:ccec0002-0ce9-4db6-a2da-eab97a95a4ad.vm-3677
SqlInfo         : SqlInfo
1- Is it possible to change its format and pass this obtained data to the "Start-VESQLRestoreSession -RestorePoint $VmRestorePoint" command?
2- Or could I do it from the Veeam Explorer for Microsoft SQL Server api or from vbr rest?

Ultimately, I want to use any api to get the latest sql restore point from a vm and restore it.
3- How could I do it?
oleg.feoktistov
Veeam Software
Posts: 1918
Liked: 636 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: restore sql from Enterprise Manager API

Post by oleg.feoktistov »

Hi Pablo,

1. No, we don't have any conversion mechanisms available for such scenarios. And it wouldn't make any sense. You might as well get by just with Veeam Powershell module in this case.

2. The only API Veeam Explorer for Microsoft SQL Server has is Powershell module.

3. You found the right cmdlet, you just need to pass there the right value. Check Get-VBRApplicationRestorePoint cmdlet.

Thanks,
Oleg
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests