Score:1

Unable to restore an MSSql Database from an Azure Storage backup

us flag

We have a simple sql script to restore an MSSql DB from an Azure storage blob. We backup our PROD DB to Azure Storage.

Trying to run this script (which we swear used to work a while ago).. now errors:

Msg 3271, Level 16, State 1, Line 11 A nonrecoverable I/O error occurred on file "https://<{snip}.blob.core.windows.net/full/{snip}.bak:" The specified URL points to a Block Blob. Backup and Restore operations on Block Blobs are not permitted.. Msg 3013, Level 16, State 1, Line 11 RESTORE DATABASE is terminating abnormally.

This .bak file is generated via MSSql using the built in Maintenance Plan functionality and does a full backup to Azure, once a week:

BACKUP DATABASE [<snip>]
TO URL = N'https://<snip>.blob.core.windows.net/full/<snip>.bak' 
WITH CREDENTIAL = N'<snip>' ,
NOFORMAT,
NOINIT,
NAME = N'<snip>',
SKIP,
REWIND,
NOUNLOAD,
COMPRESSION,
STATS = 10

Here's what the Azure GUI says for this destination blog in Azure Storage:

enter image description here

and the script we've used:

RESTORE DATABASE <snip> -- |||||--CHANGE--|||||
FROM URL = 'https://<snip>.blob.core.windows.net/full/<snip>.bak' -- |||||--CHANGE--|||||
WITH CREDENTIAL = '<snip>',
MOVE N'<snip>' TO <snip>,
MOVE N'<snip>_log' TO <snip>,  
NOUNLOAD,  
REPLACE,  
STATS = 1
GO

Is this a problem with our restore script OR we are incorrectly backing up FULL to azure?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.