Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backup-DbaDbMasterKey missing file extention in Filename property #9339

Closed
bilodeauj opened this issue May 1, 2024 · 1 comment · Fixed by #9360
Closed

Backup-DbaDbMasterKey missing file extention in Filename property #9339

bilodeauj opened this issue May 1, 2024 · 1 comment · Fixed by #9360
Assignees

Comments

@bilodeauj
Copy link

Verified issue does not already exist?

I have searched and found no existing issue

What error did you receive?

No error was reported by the command, but i noticed an issue in the path to key that was backed up, where the file extention is missing.

Steps to Reproduce

Run the Following command to backup the Database Master Key

$Computer = 'Server01'
$InstanceName = 'MSSQLSERVER'
$DMKBackup = Backup-DbaDbMasterKey -SqlInstance "$Computer\$InstanceName" -Database master -Verbose

When referencing the $DMKBackup.Path or $DMKBackup.Filename property is shows the following and the .key file extention is missing. The actual file the .key extention, however the .Path and .Filename property is missing the extention.

G:\BACKUPS\Server01-master-masterkey-20240501121231

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

2.1.14

Other details or mentions

When using Backup-DbaServiceMasterKey the .Path and Filename property includes the file extention, but Backup-DbaDbMasterKey doesn't. So there is an inconsistency in the behaviour

What PowerShell host was used when producing this error

Windows PowerShell ISE (powershell_ise.exe)

PowerShell Host Version

Name Value


PSVersion 5.1.20348.643
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.20348.643
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

SQL Server Edition and Build number

Microsoft SQL Server 2022 (RTM-CU12) (KB5033663) - 16.0.4115.5 (X64) Mar 4 2024 08:56:10 Copyright (C) 2022 Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2022 Standard 10.0 (Build 20348: ) (Hypervisor)

.NET Framework Version

.NET Framework 4.8.4515.0

@bilodeauj bilodeauj added bugs life triage required New issue that has not been reviewed by maintainers labels May 1, 2024
@andreasjordan
Copy link
Contributor

Thanks for reporting this, will open a pull request for a fix shortly.

@andreasjordan andreasjordan removed the triage required New issue that has not been reviewed by maintainers label May 19, 2024
@andreasjordan andreasjordan self-assigned this May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants