PowerShell script exchange
Post Reply
hmurat
Influencer
Posts: 11
Liked: never
Joined: Nov 15, 2018 9:48 pm
Contact:

9.5 Update4 - Attempting restore, no session exists

Post by hmurat » Jan 18, 2019 9:10 pm

Hello!

We've recently updated 9.5 Update4 and I'm seeing the "your old cmdlets are old, use the new ones" message, so I'm attempting it and failing.

The examples from Get-Help Restore-VESQLDatabase show the following:

Code: Select all

$session = Get-VESQLRestoreSession
$database = Get-VESQLDatabase -Session $session[0] -Name "MyDatabaseName"
Restore-VESQLDatabase -Database $database -Server "ServerNameGoesHere"
The problem I'm experiencing is that the $session variable comes out null. There are no restore sessions taking place and I cannot figure out how to create one. Does anyone have any suggestions?

Also, I've noticed that the documentation here https://helpcenter.veeam.com/docs/backu ... tml?ver=95 isn't yet up to date - is there an ETA for this?

Thanks in advance!

Hugh

hmurat
Influencer
Posts: 11
Liked: never
Joined: Nov 15, 2018 9:48 pm
Contact:

Re: 9.5 Update4 - Attempting restore, no session exists

Post by hmurat » Jan 18, 2019 10:13 pm

The error I receive:

Code: Select all

Cannot index into a null array.

v.Eremin
Product Manager
Posts: 15965
Liked: 1284 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: 9.5 Update4 - Attempting restore, no session exists

Post by v.Eremin » Jan 21, 2019 2:07 pm

Have you started VESQL restore session first, using Start-VESQLRestoreSession cmdlet? Thanks!

hmurat
Influencer
Posts: 11
Liked: never
Joined: Nov 15, 2018 9:48 pm
Contact:

Re: 9.5 Update4 - Attempting restore, no session exists

Post by hmurat » Jan 22, 2019 6:08 pm

Nope, I sure didn't! I ran Get-Command -Module VeeamPsSnapin to get all the cmdlets available in that module and didn't see Start-VESQLRestoreSession in the list of available commands. Is this still the correct powershell module or should I be using something different?

v.Eremin
Product Manager
Posts: 15965
Liked: 1284 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: 9.5 Update4 - Attempting restore, no session exists

Post by v.Eremin » Jan 22, 2019 6:29 pm

It might be implemented as a part of different VESQL module (if my memory serves me well). Anyway, can you try to executed restore session, using the mentioned cmdlet, and see what happens? Thanks!

hmurat
Influencer
Posts: 11
Liked: never
Joined: Nov 15, 2018 9:48 pm
Contact:

Re: 9.5 Update4 - Attempting restore, no session exists

Post by hmurat » Jan 22, 2019 6:48 pm

I did some poking around and found the VESQL commands you're referring to inside the Veeam.SQL.PowerShell module. I'll give it a shot today and post back what I've been able to accomplish! Thank you!

v.Eremin
Product Manager
Posts: 15965
Liked: 1284 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: 9.5 Update4 - Attempting restore, no session exists

Post by v.Eremin » Jan 22, 2019 6:53 pm

Great, this means I remembered everything correctly: for each explorer (besides one for Active Directory) there is a dedicated PowerShell module - VESQL, VESP and VEX. Thanks!

hmurat
Influencer
Posts: 11
Liked: never
Joined: Nov 15, 2018 9:48 pm
Contact:

Re: 9.5 Update4 - Attempting restore, no session exists

Post by hmurat » Jan 25, 2019 9:35 pm

I haven't and a ton of time, but I've been tinkering a little bit. I need to figure out which ApplicationRestorePoint to use when instantiating the RestoreSession.

jhoughes
Veeam Software
Posts: 56
Liked: 15 times
Joined: Apr 20, 2017 4:19 pm
Full Name: Joe Houghes
Location: Austin, TX
Contact:

Re: 9.5 Update4 - Attempting restore, no session exists

Post by jhoughes » Jan 25, 2019 10:13 pm

The restore session must be initialized with the created with Start-VESQLRestoreSession first, that is why your $session variable is empty when you first run the code.

You can also find the updated docs for Get-VBRApplicationRestorePoint here.

You can either use the "SQL" parameter to find all SQL restore points and select which object within the array to use.

Otherwise,m you may want to first determine which point you want based on time of the backup, then use the ID of that object with "Get-VBRApplicationRestorePoint -ID" to return that single application restore point.
Husband, Father, Solutions Architect, Geek Extraordinaire | @AustinVMUG & @ATXPowerShell leader | vExpert | Cisco Champion | Tech Field Day Delegate | VCP 4/5/6 | VCP6-NV | VMware/Cisco UCS/Powershell/VEEAM Enthusiast

hmurat
Influencer
Posts: 11
Liked: never
Joined: Nov 15, 2018 9:48 pm
Contact:

Re: 9.5 Update4 - Attempting restore, no session exists

Post by hmurat » Feb 06, 2019 5:10 pm

Thanks for the response - as soon as I've got the time to spend on this, I'll post back with my experiences and probably an example of the script I'm using.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests