有什么方法可以从 Powershell 共享的 Azure 文件(不是 blob)下载文件
Is any way can download file from Azure File(not blob) share by powershell
我想通过 powershell 从 Azure 文件存储下载一个大文件,
我发现所有的解决方案都是使用 Azure blob,它不能使用 Azure 文件,
有什么方法可以从 Azure 文件下载文件吗?
[注意:因为文件很大(127GB),下载起来比较费时间(可能需要3~4天),所以我用浏览器下载的时候总是坏]
官方文档如下:https://docs.microsoft.com/en-us/azure/storage/storage-powershell-guide-full
您可以使用以下 cmdlet 从 Azure 文件共享下载文件。
$ctx = New-AzureStorageContext [storageaccountname] [storageaccountkey]
##sharename is your existed name.
$s = Get-AzureStorageShare [sharename] –Context $ctx
##To download a file from the share to the local computer, use Get-AzureStorageFileContent.
Get-AzureStorageFileContent –Share $s –Path [path to file on the share] [path on local computer]
如果你想使用一个命令下载多个文件,你可以使用Azcopy。
AzCopy /Source:https://myaccount.file.core.windows.net/myfileshare/ /Dest:C:\myfolder /SourceKey:key /S
更多信息请参考此link。
您可以通过 3 种方式完成
1. Azure 存储资源管理器
在任何 windows 中安装 azure storage explorer,您可以从那里下载文件
2。 AZ 复制
在 powershell 中执行以下命令以从 azure blob 下载文件
在powershell中执行如下命令
&'C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy\AzCopy.exe' /Source:https://<STORAGE-ACCOUNT-NAME>.blob.core.windows.net/test-adf /Dest:'C:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS\MSSQL\Backup' /SourceKey:<BLOB-KEY> /S /XO
3。 Azure 文件服务
您可以将 blob 连接为外部驱动器,以便轻松复制文件
我想通过 powershell 从 Azure 文件存储下载一个大文件,
我发现所有的解决方案都是使用 Azure blob,它不能使用 Azure 文件,
有什么方法可以从 Azure 文件下载文件吗?
[注意:因为文件很大(127GB),下载起来比较费时间(可能需要3~4天),所以我用浏览器下载的时候总是坏]
官方文档如下:https://docs.microsoft.com/en-us/azure/storage/storage-powershell-guide-full
您可以使用以下 cmdlet 从 Azure 文件共享下载文件。
$ctx = New-AzureStorageContext [storageaccountname] [storageaccountkey]
##sharename is your existed name.
$s = Get-AzureStorageShare [sharename] –Context $ctx
##To download a file from the share to the local computer, use Get-AzureStorageFileContent.
Get-AzureStorageFileContent –Share $s –Path [path to file on the share] [path on local computer]
如果你想使用一个命令下载多个文件,你可以使用Azcopy。
AzCopy /Source:https://myaccount.file.core.windows.net/myfileshare/ /Dest:C:\myfolder /SourceKey:key /S
更多信息请参考此link。
您可以通过 3 种方式完成
1. Azure 存储资源管理器
在任何 windows 中安装 azure storage explorer,您可以从那里下载文件
2。 AZ 复制
在 powershell 中执行以下命令以从 azure blob 下载文件
在powershell中执行如下命令
&'C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy\AzCopy.exe' /Source:https://<STORAGE-ACCOUNT-NAME>.blob.core.windows.net/test-adf /Dest:'C:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS\MSSQL\Backup' /SourceKey:<BLOB-KEY> /S /XO
3。 Azure 文件服务
您可以将 blob 连接为外部驱动器,以便轻松复制文件