Share via

Can't Backup Sql Managed Instance

Jeremy Vetter 0 Reputation points
2023-05-24T17:26:22.1766667+00:00

I am trying to run a SQL Backup on a Managed Instance. I am using this article as an example.

It has actually worked once and I haven't changed anything and now it doesn't work. I know I must have done something but I just can't figure it out. I even created a Network Security Policy to let all traffic out of my MI Subnet. I have a private endpoint connecting to my storage account going to a subnet of my MI's vnet. I am lost why it doesn't work. I am getting an error code 50. I am running a Network Security Flow Log to see if that will shed any light on my issue. Any suggestions would be great. I really don't want to use bacpac if possible but even if I did it probably wouldn't be able to write it.

Here is the backup error message:

BACKUP DATABASE WebSite
TO  URL = 'https://**.blob.core.windows.net/websitebackup/Website_1.bak' 
WITH  COPY_ONLY, COMPRESSION, Stats = 5
GO

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

Here is the restore error message:

RESTORE DATABASE [WebSite] FROM 
URL = N'https://**.blob.core.windows.net/websitebackup/Website.bak'

Msg 3201, Level 16, State 2, Line 44 Cannot open backup device 'https://**.blob.core.windows.net/websitebackup/Website.bak'. Operating system error 12002(failed to retrieve text for this error. Reason: 317). Msg 3013, Level 16, State 1, Line 44 RESTORE DATABASE is terminating abnormally.

I ran an events session capturing sqlserver.backup_restore_progress_trace events for only backup. I have attached that file too.

ExtendedEvents.txt

Community Center | Not monitored

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.