How do I translate this AzCopy command:
azcopy.exe sync "https://xxxxxx.blob.core.windows.net/xxxxx/...." "https://xxxxxx.blob.core.windows.net/xxxxx/...." --recursive
To an Azure Runbook command?
I played around with Start-AzureStorageBlobCopy
but can't get it to work with 2 URI's
R. Kim
The Powershell Cmdlet
Start-AzureStorageBlobCopy
is part of Azure RM module as we know thatAzureRM module
is going to be retried on 29 February 2024.Suspended
automatically.Az
Module Cmdlets in your runbook scripts.You can use
Start-AzStorageBlobCopy
cmdlet to copy the blobs from one storage account to another storage account.To test this i have created a PowerShell run book with the script below (copying all the blobs from source storage account container to destination storage account container) and connected it to azure account by enabling managed identity on the automation account.
Refer to this documentation for more information about the Start-AzStorageBlobCopy cmdlet and the list of support parameters.
Alternatively, if you want to AZ copy in your run book i would suggest you to use the Hybrid run book worker which would allow you to pre-install AzCopy and then execute any runbook on that worker.
For more information on Azcopy in Automation Account you can refer to this similar MSDN thread.