Skip to content

Commit b87f095

Browse files
Test-DbaLastBackup - Fix -Path workflow restore failure
Set TrustDbBackupHistory to true for -Path workflow since backup history objects from Get-DbaBackupInformation are valid and should not be re-processed. Fixes type conversion issue where Select-Object converts BackupHistory to PSCustomObject, causing Restore-DbaDatabase to misinterpret them as file paths. (do Test-DbaLastBackup) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 5cce09f commit b87f095

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

public/Test-DbaLastBackup.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ function Test-DbaLastBackup {
518518
FileExists = $true
519519
SkipRestoreResult = $null
520520
SkipDbccResult = $null
521-
TrustDbBackupHistory = $false
521+
TrustDbBackupHistory = $true
522522
IgnoreDiffBackupInRestore = (Test-Bound "IgnoreDiffBackup")
523523
RemoveArray = $null
524524
EffectiveDataDirectory = $effectiveDataDirectory

0 commit comments

Comments
 (0)