Share via


Backup to URL - The file name "http..." is invalid as a backup device name

Question

Wednesday, April 5, 2017 11:01 AM

I'm trying to backup to URL using the Azure storage emulator, but I'm getting the following message:

BACKUP DATABASE MyDB
TO URL = 'http://127.0.0.1:10000/devstoreaccount1/tempbackup'

The file name "http://127.0.0.1:10000/devstoreaccount1/tempbackup" is invalid as a backup device name for the specified device type. Reissue the BACKUP statement with a valid file name and device type.

All replies (3)

Wednesday, April 5, 2017 7:16 PM ✅Answered

The URL can't just be any URL. It has to point to Azure Blob Storage.

Tibor Karaszi, SQL Server MVP (Web Blog)


Thursday, April 6, 2017 3:19 AM ✅Answered

Hi Rodolfo28,

 

As mentioned by Tibor, SQL Server Backup to URL is a feature which uses the Windows Azure Blob storage service as a backup destination. For more information, please refer to this article: https://technet.microsoft.com/en-us/library/dn435916(v=sql.120).aspx

 

You can refer to the following code:

 

BACKUP DATABASE
AdventureWorks2012   

TO URL = 'https://mystorageaccount.blob.core.windows.net/mycontainer/AdventureWorks2012_1.bak'  

Best Regards,

Teige

 

MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


Wednesday, April 5, 2017 11:07 AM

Hello,

Which SQL Server Version incl. patch Level are you using? Backup to Url is supported only for SQL Server 2012 SP1 CU2 and higher Versions; see BACKUP (Transact-SQL) => URL parameter

Olaf Helper

[ Blog] [ Xing] [ MVP]