PowerShell script exchange
Post Reply
michawel
Novice
Posts: 4
Liked: never
Joined: Oct 19, 2025 6:11 pm
Full Name: Michal Doležal
Contact:

PowerShell restore job for SQL server

Post by michawel »

Hi, I found interesting behavior. We have Veeam Backup 13 (appliance) with VHR. We are backing up Always-On SQL cluster. Everything works. We are able to backup in all possible modes (also using application backup - however in this case not able to restore to standalone server - but based on technical support is this by design). We are backing up physical SQL server. We would like to restore using Powershell script. This is pretty common. But here I found some issue. When I backup this server without Application-aware backup or with Application aware backup enabled with copy-only mode I am not able to restore database to different server. When I enable full transactional log backup I am able to restore everything properly. However when I have done this over console so I run backup without application aware and then tried to restore I was able to restore database without issue. SQL Explorer opened properly, database found, database is possible to restore. But using Powershell I am not able to find the object.
I hope that I am using proper sniplets. Problem is in command Get-VBRApplicatationRestorePoint -SQL which is not able to find correct restore point. Normally Get-VBRRestorePoint is used however this cannot be used for restore of database. Is there any other way? I am just asking we are able to do what we want but this is interesting inconsistency.
Just short summary: Get-VBRApplicationrestorePoint is not returning recovery point when Application-aware backup is disabled (this makes sense) however also in case App-aware backup is enabled and only Copy-log function is set and this can be weird little bit.
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests