Azure Managed Instance manual backup to Storage container

Gasongo, Ildephonse 1 Reputation point
2020-08-26T19:59:26.09+00:00

I am migrating to Azure Managed Instance. Once there, I have to be regularly refreshing the lower environments from production. My script to take a manual .bak to a storage container is failing.

I am connect to the managed instance from a jumpbox.
I created a container into a storage.
I created the credential on the managed instance from the SSMS on the Jumpbox

When I try to take a backup with the command below, it fails.
When I try to use the SSMS backup wizard, I can see the container on the connect to a Microsoft Subscription screen. I can create and generate a shared access signature. But when I click OK, the wizard does not populate the signature into the Select Backup Destination screen.

Msg 3201, Level 16, State 1, Line 13
Cannot open backup device 'https://vuedvucexmdevmigrationsa.blob.core.windows.net/devbackuparchivetestilde/ItemGroupDevOld20200824.bak'. Operating system error 50(The request is not supported.).
Msg 3013, Level 16, State 1, Line 13
BACKUP DATABASE is terminating abnormally.

Azure Backup
Azure Backup
An Azure backup service that provides built-in management at scale.
1,174 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Gasongo, Ildephonse 1 Reputation point
    2020-08-27T17:44:18.973+00:00

    It worked. I tried the wizard and it worked. I do not know why.

    But I realized that the TO URL = is expecting a NVarchar

    BACKUP DATABASE databasename
    TO URL = N'https://storageaccountname.blob.core.windows.net/containername/filename.bak'
    WITH COPY_ONLY;