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

[Bug] Backup to URL with Folder Fails with Error #5347

Closed
2 of 3 tasks
jdanton opened this issue Apr 9, 2019 · 1 comment · Fixed by #5349
Closed
2 of 3 tasks

[Bug] Backup to URL with Folder Fails with Error #5347

jdanton opened this issue Apr 9, 2019 · 1 comment · Fixed by #5349
Labels
bugs life confirmed Label to be used by maintainers that confirm a bug does exist for the given issue good first issue

Comments

@jdanton
Copy link

jdanton commented Apr 9, 2019

Before submitting a bug report:

Collect output of following command and paste below:

Backup-DbaDatabase -SQLInstance 'VM1'
-FileCount 4 -CompressBackup
-CreateFolder -AzureBaseURL 'https://backupdemo.blob.core.windows.net/backups/'
-SQLCredential $cred


[14:27:24][Backup-DbaDatabase] Backup Failed | System.Data.SqlClient.SqlError: The file name 
"https:\backupdemo.blob.core.windows.net\backups\master\master_201904091427-1-of-4.bak" is invalid as a backup device 
name for the specified device type. Reissue the BACKUP statement with a valid file name and device type.
[14:27:24][Backup-DbaDatabase] Backup Failed | System.Data.SqlClient.SqlError: The file name 
"https:\backupdemo.blob.core.windows.net\backups\model\model_201904091427-1-of-4.bak" is invalid as a backup device 
name for the specified device type. Reissue the BACKUP statement with a valid file name and device type.
[14:27:24][Backup-DbaDatabase] Backup Failed | System.Data.SqlClient.SqlError: The file name 
"https:\backupdemo.blob.core.windows.net\backups\msdb\msdb_201904091427-1-of-4.bak" is invalid as a backup device name 
for the specified device type. Reissue the BACKUP statement with a valid file name and device type.

& {"### PowerShell version:`n$($PSVersionTable | Out-String)"; "`n### dbatools Module version:`n$(gmo dbatools -List | select name, path, version | fl -force | Out-String)"}

dbatools 0.9.802

  • Running latest release of dbatools
  • Verified errors are not related to permissions
  • Is this bug with Copy-DbaDatabase? You can replicate it using Backup-DbaDatabase ... | Restore-DbaDatabase ...

NOTE: Copy-DbaDatabase will not work in every environment and every situation. Instead, we try to ensure Backup & Restore work in your environment.

Environmental data

Running in the context of Azure Automation Runbook.

<# REPLACE WITH output OF environment one-liner #>

SQL Server:

/* REPLACE WITH output of @@VERSION */

Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) - 14.0.3048.4 (X64) Nov 30 2018 12:57:58 Copyright (C) 2017 Microsoft Corporation Developer Edition (64-bit) on Windows Server 2016 Datacenter 10.0 (Build 14393: ) (Hypervisor)

Errors Received

<# OUTPUT of $error[0] | select * #>

Steps to Reproduce

/*
    Any T-SQL commands involved or used to produce test objects/data.
*/
<#
    Provide exact (or sanitized) code to reproduce the error


 Backup-DbaDatabase `
        -SQLInstance 'VM1'`
		-FileCount 4  `
		-CompressBackup `
        -CreateFolder `
		-AzureBaseURL 'https://backupdemo.blob.core.windows.net/backups/'`
        -SQLCredential $cred

#>


## Expected Behavior

<!--
Sample output or detail explanation if possible
-->

## Actual Behavior

<!--
Output or detailed explanation if possible
-->
@wsmelton wsmelton added bugs life confirmed Label to be used by maintainers that confirm a bug does exist for the given issue labels Apr 9, 2019
@wsmelton
Copy link
Member

wsmelton commented Apr 9, 2019

We do not support creating folders in Azure Storage via the Backup command. We will need to update the code to throw if the CreateFolder parameter is provided with the -AzureBaseURL.

@Stuart-Moore Stuart-Moore mentioned this issue Apr 10, 2019
10 tasks
potatoqualitee pushed a commit that referenced this issue Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugs life confirmed Label to be used by maintainers that confirm a bug does exist for the given issue good first issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants