dataplat / dbatools

🚀 SQL Server automation and instance migrations have never been safer, faster or freer

Home Page:https://dbatools.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get-DbaBackupInformation is not reading values for "IsCopyOnly" attribute

david-garcia-garcia opened this issue · comments

Verified issue does not already exist?

I have searched and found no existing issue

What error did you receive?

Get-DbaBackupInformation is not reading values for "IsCopyOnly" attribute. There are differences in results between calling Get-DbaBackupInformation and Read-DbaBackupHeader on a COPY ONLY backup.

image

Steps to Reproduce

$path = "c:\mycopyonly.bak"
$a = Get-DbaBackupInformation "localhost" -Path $path
$b = Get-ReadDbaBackupHeader "localhost" -Path $path

# Note that $a.IsCopyOnly != $b.IsCopyOnly

Please confirm that you are running the most recent version of dbatools

2.1.7

Other details or mentions

No response

What PowerShell host was used when producing this error

PowerShell Core (pwsh.exe), Windows PowerShell (powershell.exe)

PowerShell Host Version

Name Value


PSVersion 7.4.1
PSEdition Core
GitCommitId 7.4.1
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

SQL Server Edition and Build number

Microsoft SQL Server 2022 (RTM) - 16.0.1000.6 (X64) Oct 8 2022 05:58:25 Copyright (C) 2022 Microsoft Corporation Developer Edition (64-bit) on Windows Server 2022 Datacenter 10.0 (Build 20348: ) (Hypervisor)

.NET Framework Version

4.7.2