Backup-DbaDatabase : add a switch that will prevent to always append dbname in the directory backup path and strictly respect the given path variable. #9346
For the command Backup-DbaDatabase, add a switch that will prevent to always append dbname in the directory backup path and strictly respect the given path variable.
Cause : Currently, Backup-DbaDatabase always appended the DbName in the backup path. This can be problematic in some cases where the backup path try to respect Ola Hallengren default path model and when the database name is long. In this case the current dbname appending lead to repeat the dbname twice in the backup path and can cause a "backup path too long" error.
Suggested switch name -NoAppendDbNameInPath
Default value would remain false to avoid impact on the existing backups scripts
Is there a command that is similiar or close to what you are looking for?
Summarize Functionality
For the command Backup-DbaDatabase, add a switch that will prevent to always append dbname in the directory backup path and strictly respect the given path variable.
Cause : Currently, Backup-DbaDatabase always appended the DbName in the backup path. This can be problematic in some cases where the backup path try to respect Ola Hallengren default path model and when the database name is long. In this case the current dbname appending lead to repeat the dbname twice in the backup path and can cause a "backup path too long" error.
Suggested switch name -NoAppendDbNameInPath Default value would remain false to avoid impact on the existing backups scripts
Is there a command that is similiar or close to what you are looking for?
Yes
Technical Details
line 664 in Backup-DbaDatabase.ps1 :