Please provide windows powershell commands to import a database backup file which is on azure blob storage account to my azure SQL vm in which sql image is installed

Aravapalli Ojeswi 0 Reputation points
2024-11-04T11:56:59.7933333+00:00

we have a windows sql vm where we have a preinstalled sql windows 2022 image in it. Now there is a database backup file that is stored in azure blob storage now we want to import that file into this azure sql vm
can we get any powershell commands for this?

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,192 questions
Windows for business | Windows Server | User experience | PowerShell
SQL Server | Other
{count} votes

2 answers

Sort by: Most helpful
  1. Olaf Helper 47,436 Reputation points
    2024-11-04T12:00:47.7433333+00:00

  2. SSingh-MSFT 16,371 Reputation points Moderator
    2024-11-05T06:54:41.84+00:00

    Hi Aravapalli Ojeswi,

    Welcome to Microsoft Q&A forum.

    As I understand, you want to perform import the backup to Azure SQL VM.

    You may do this using Backup job.

    Please refer to https://learn.microsoft.com/en-us/azure/backup/backup-azure-sql-automation

    for complete detailed documentation.

    Also refer https://gist.github.com/voxon2/be29a3fd6dabbb9155ca to ExportAzureDatabaseToBlobStorage as reference and modify it as per you usecase.

    Let us know if you have more queries.

    Thanks

    0 comments No comments

Your answer

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