@MR BILL Adding more information to the above response! of @Sai
There’s no(one) call way to copy the container, you would have to first list all the blobs in the container and then copy each and every blob into the new container,
“Can you copy a container or not? Everything I've found so far talks about copying blobs from the container, but not the container and all it's contents.”
Firstly we have to list all the blobs in the container and copy each and every one of them over.
However their scenario of the “address” / name of the blobs changing during the copy is worrisome to me because then the original list call of all the blob paths
would become invalid since they change the name of the blobs midflight of copying other blobs.
We shouldn't change the name of the blobs while a copy is occurring, or you have to keep listing all the blobs in the container in order to get a current version of the container.
Copy and move blobs from one container or storage account to another from the command line and in code: https://learn.microsoft.com/en-us/training/modules/copy-blobs-from-command-line-and-code/
Azcopy is the best option for your scenario! AzCopy v10 is just as fast as Fast Data Transfer, but is easier to set up. Customers should use AzCopy v10 in most cases. Fast Data Transfer runs on Windows and Linux. Its client-side portion is a command-line application that runs on-premises, on your own machine. A single client-side instance supports up to 10 Gbps. Its server-side portion runs on Azure VM(s) in your own subscription. Depending on the target speed, between 1 and 4 Azure VMs are required. An Azure Resource Manager template is supplied to automatically create the necessary VM(s). The tool works by maximizing utilization of the network link. It efficiently uses all available bandwidth, even over long-distance links. On a 10 Gbps link, it reaches around 4 TB per hour, which makes it about 3 to 10 times faster than competing tools we’ve tested. On slower links, Fast Data Transfer typically achieves over 90% of the link’s theoretical maximum, while other tools may achieve substantially less
This article provides an overview of some of the common Azure data transfer solutions. The article also links out to recommended options depending on the network bandwidth in your environment and the size of the data you intend to transfer. Choose an Azure solution for data transfer based on your requirements.
There are several options for transferring data to and from Azure, depending on your needs. Transfer data to and from Azure
We had to copy a bunch of containers from one storage account to another recently, and needed to be able to do it repeatedly, incrementally, and programmatically, we wrote some PowerShell functions to do it: (see CreateContainers, CopyContainers, and CopyBlobs functions).
This is the most optimal way to do it; however, some of the containers were quite large so we had to incorporate background copying of large batches of files to get decent performance, so in that sense, it’s probably pretty good for what it does. (By background copying, we mean to tell the storage system to do the copy directly from storage account to storage account, the data never travels to the system running the program – which avoids a huge overhead. This is different than the sample code you linked to which is focused on uploading and downloading, which would make the local system a bottleneck.)
You will probably notice it’s not directly copying folders. That’s because in the standard storage setup folders don’t really exist, they’re just a grouping of files with the same name (in other words, copying the files implicitly copies the ‘folders’ and there’s no way to have an empty folder). That may be different for hierarchical storage, and it’s definitely different for files. The code only works for blobs, and We have only tested it on non-hierarchical storage
Please let us know if you have any further queries. I’m happy to assist you further.
----------
Please do not forget to
and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.