is utilizing transaction SQL log backup provided by Veeam. A question came up while attempting to restore a SQL database that is covered by this whether Veeam is restoring only the snapshot or the snapshot and rerunning the logs up to the point called for by the -ToPointTime. The script we are using is as follows:
- Code: Select all
Add-PSSnapin -Name VeeamPSSnapIn
$restorepoint = Get-VBRApplicationRestorePoint -SQL -Name "ProBus SQL" | Select -Last 1
$ProductionDatabase = Get-VBRSQLDatabase -ApplicationRestorePoint $restorepoint -Name "MANGA"
$guestcreds = Get-VBRCredentials -Name "domain\veeamsvc"
$sqlcreds = Get-VBRCredentials -Name "domain\veeamsvc"
$DateTime = (get-date)
$DateTimeDesired = $DateTime.AddMinutes(-30)
$UDateTime = $DateTimeDesired.ToUniversalTime()
Start-VBRSQLDatabaseRestore -Database $ProductionDatabase -ServerName TESTSQLSVR -DatabaseName MANGA_DAILY_PROD -GuestCredentials $guestcreds -SqlCredentials $sqlcreds -ToPointInTime $UDateTime
The script seems to run however the variable $UDateTime is a UniversalTime which produces the output "Wednesday, April 6, 2016 3:18:35 PM" which we are not sure is being read correctly. Any ideas on this subject?
One additional question is when using PowerShell, where are the logs for the interaction being stored?