[英]Not able to upload the .bacpac file from Azure VM to Azure blob storage container
I am working on a use case, where I will be deploying the DB schema from Development to UAT and Production, but before deploying to UAT and production, i am taking the backup of both UAT and production as a.bacpac file.我正在处理一个用例,我将在其中将数据库模式从开发部署到 UAT 和生产,但在部署到 UAT 和生产之前,我将 UAT 和生产的备份作为 a.bacpac 文件。 Below are the steps I have performed in Azure DevOps pipeline
以下是我在 Azure DevOps 管道中执行的步骤
Generated the.bacpac file using "Azure SQL Database deployment" inbuilt task.使用“Azure SQL 数据库部署”内置任务生成 .bacpac 文件。 The file generated at "D:\a\r1\a\GeneratedOutputFiles\filename.bacpac
在“D:\a\r1\a\GeneratedOutputFiles\filename.bacpac 生成的文件
check if the file exist on the above path -> Yes file is available.检查文件是否存在于上述路径 -> 是文件可用。
Copy to blob storage using "Azure File Copy" inbuilt task.使用“Azure 文件复制”内置任务复制到 blob 存储。 The Source path which I took is $(System.ArtifactsDirectory)\GeneratedOutputFiles
我采用的源路径是 $(System.ArtifactsDirectory)\GeneratedOutputFiles
and destination is my blob container.目的地是我的 blob 容器。 PFA, the details about each step and the logs in the google drive document.
PFA,关于每个步骤的详细信息和谷歌驱动器文档中的日志。 The issue is I am not able to upload the file to blob storage as the logs says that the source folder is empty, but the file is present in the source folder.
问题是我无法将文件上传到 blob 存储,因为日志显示源文件夹为空,但文件存在于源文件夹中。 Can someone please take a look and guide me what I am missing here?
有人可以看看并指导我在这里缺少什么吗? Google Drive path of the document
文档的 Google Drive 路径
You can use AzCopy
to copy files from or to Azure Blob storage.可以使用
AzCopy
从 Azure Blob 存储中复制文件或向其中复制文件。
AzCopy is a command-line utility that you can use to copy blobs or files to or from a storage account.
AzCopy 是一个命令行实用工具,可用于将 blob 或文件复制到存储帐户或从中复制。
You can visit this official document by Microsoft to download and know more about AzCopy.您可以访问微软官方文档下载并了解更多关于AzCopy的信息。
Also, to copy the files from Azure VM to Blob Storage follow this third-party tutorial .此外,要将文件从 Azure VM 复制到 Blob 存储,请遵循此第三方教程。
In the AzCopy command, you will be required to use SAS Token of the container in which you want to copy the.bacpac file.在 AzCopy 命令中,您将需要使用要在其中复制 .bacpac 文件的容器的 SAS 令牌。
The new v4
of the File Copy Task in Azure Pipelines moved from using AzCopy 8 to AzCopy 10, and it requires more security for Azure DevOps Service Principal to authenticate with Azure. Azure 管道中文件复制任务的新
v4
从使用 AzCopy 8 转移到 AzCopy 10,它需要更高的安全性来让 Azure DevOps 服务主体通过 Azure 进行身份验证。
You can:你可以:
Storage Blob Data Contributor
and Storage Blob Data Owner
Storage Blob Data Contributor
和Storage Blob Data Owner
You can find more details in link:https://github.com/microsoft/azure-pipelines-tasks/issues/13124您可以在链接中找到更多详细信息:https://github.com/microsoft/azure-pipelines-tasks/issues/13124
and https://brettmckenzie.net/2020/03/23/azure-pipelines-copy-files-task-authentication-failed/ .和https://brettmckenzie.net/2020/03/23/azure-pipelines-copy-files-task-authentication-failed/ 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.