I am looking for an alternative to :
New-AzureRmSqlDatabaseExport
For the purpose of taking Managed Instance Database backup and export it to storage account. The above command, I think supports only SQL Server.
Yes, your're right, Powershell command doesn't support export the Azure SQL managed instance for now, you could reference this document: Export to a BACPAC file using PowerShell :
Besides, the document also gives the other ways:
Exporting a BACPAC of a database from a managed instance using Azure PowerShell is not currently supported. Use SQL Server Management Studio or SQLPackage instead.
At least, you also can use T-SQL to backup the Azure SQL manage instance to Blob Storage:
First, you would need to store credentials that would be used to access Azure Blob Storage:
CREATE CREDENTIAL [https://myacc.blob.core.windows.net/testcontainer]
WITH IDENTITY='SHARED ACCESS SIGNATURE'
, SECRET = 'sv=2014-02-14&sr=c&sig=GV0T9y%2B9%2F9%2FLEIipmuVee3jvYj4WpvBblo%3D&se=2019-06-01T00%2A%3AZ&sp=rwdl';
Once you create a credential, you can backup any database using standard BACKUP T-SQL command:
BACKUP DATABASE tpcc2501
TO URL = 'https://myacc.blob.core.windows.net/testcontainer/tpcc2501.bak'
WITH COPY_ONLY
Reference this Azure blog: Native database backup in Azure SQL Managed Instance .
Hope this helps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.