-
-
Notifications
You must be signed in to change notification settings - Fork 808
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-DbaDbCertificate - Support Custom Backup File Name #9485
Comments
Is there any difference to you just running |
While using
|
Backup of a databases is the most common thing a DBA does for automation and something that is done frequently, along with pipeline the objects and querying for the given file name is possible with database backups. That is not a comparable command or functionality to backing up other types available in SQL Server because they are done as one-offs, or very infrequently (e.g., you create a cert key and back it up you are generally not going to backup it up again). Our module puts more consideration into ensure that database backup scenarios are covered that may occur in the wild. Repeating this though in every command possible adds more code and logic for us to maintain testing with to ensure functionality works across versions of both SQL Server and PowerShell. While it is only a few lines per command, that adds up. Particularly because a one-line command in PowerShell can be used to rename the item however a user might want is available I'm not in favor of adding this parameter support. |
The issue with the current implementation of For example, if we run:
We will get these files:
The original certificate name is embedded within a longer string that includes the server name, database name and certificate name. This makes it difficult to reliably identify the certificate by its original name. Considering when restoring certificates, people often want to maintain the original certificate name. The current naming scheme doesn't facilitate this easily. |
Summarize Functionality
SQL Command allows specifying the file name when backing up the service master key. Backup-DbaDbCertificate currently automatically sets the filename. It would be nice to have the option here as well.
Relates to #9483 , #9484
Is there a command that is similiar or close to what you are looking for?
Yes
Technical Details
SQL
Existing File name command, Line 167, 178
Suggested change adding an option Filename parameter. Potentially add both a filename param for private key file name and certificate key file name.
The text was updated successfully, but these errors were encountered: