[英]Export Azure Managed Instance Database backup to storage account
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.
上面的命令,我认为只支持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 :是的,您说得对,Powershell 命令暂时不支持导出 Azure SQL 托管实例,您可以参考此文档: 使用 PowerShell 导出到 BACPAC 文件:
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.当前不支持使用 Azure PowerShell 从托管实例导出数据库的 BACPAC。 Use SQL Server Management Studio or SQLPackage instead.
请改用 SQL Server Management Studio 或 SQLPackage。
At least, you also can use T-SQL to backup the Azure SQL manage instance to Blob Storage:至少,您还可以使用 T-SQL 将 Azure SQL 管理实例备份到 Blob 存储:
First, you would need to store credentials that would be used to access Azure Blob Storage:首先,您需要存储用于访问 Azure Blob 存储的凭据:
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 T-SQL 命令备份任何数据库:
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 .参考此 Azure 博客: Azure SQL 托管实例中的本机数据库备份。
Hope this helps.希望这可以帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.