Good afternoon!
Tell me how to restore the current copy of the SQL database using PS?
From the management console, I have the ability to restore the closest point. Via PS, the output of the Get-VBRRestorePoint command does not show the latest recovery points. Log transactions every 15 minutes
-
- Lurker
- Posts: 1
- Liked: never
- Joined: Feb 14, 2020 6:31 am
- Contact:
-
- Product Manager
- Posts: 2578
- Liked: 707 times
- Joined: Jun 14, 2013 9:30 am
- Full Name: Egor Yakovlev
- Location: Prague, Czech Republic
- Contact:
Re: Restore current copy
You need to use Start-VESQLRestoreSession, pick a database from mounted backup via Get-VESQLDatabase, find available restore interval Get-VESQLDatabaseRestoreInterval and restore via Restore-VESQLDatabase with -ToPointInTime parameter. Last but not least, stop mounted session via Stop-VESQLRestoreSession.
Check out Veeam Explorer for Microsoft SQL Powershell Reference Guide.
/Cheers!
Check out Veeam Explorer for Microsoft SQL Powershell Reference Guide.
/Cheers!
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Restore current copy
Besides, use Get-VBRApplicationRestorePoint rather than Get-VBRRestorePoint to retrieve restore points with AAIP enabled.
Then, filter it by creation time and pass to Start-VESQLRestoreSession, like Egor wrote above.
Example:
Then, filter it by creation time and pass to Start-VESQLRestoreSession, like Egor wrote above.
Example:
Code: Select all
$date = (Get-Date).AddHours(-24)
$restorepoint = Get-VBRApplicationRestorePoint -SQL | where {$_.CreationTime -ge $date}
Start-VESQLRestoreSession -RestorePoint $restorepoint[-1]
Who is online
Users browsing this forum: masahide.k and 15 guests