You have an on-premises server that contains a folder named D:\Folder1.
You need to copy the contents of D:\Folder1 to the public container in an Azure Storage account named contosodata.
Which command should you run?
Click on the arrows to vote for the correct answer
A. B. C. D.C
The azcopy copy command copies a directory (and all of the files in that directory) to a blob container. The result is a directory in the container by the same name.
Incorrect Answers:
B: The azcopy sync command replicates the source location to the destination location. However, the file is skipped if the last modified time in the destination is more recent.
D: The az storage blob copy start-batch command copies multiple blobs to a blob container.
https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-blobs https://docs.microsoft.com/en-us/azure/storage/common/storage-ref-azcopy-copyThe correct answer is C. azcopy copy D:\folder1 https://contosodata.blob.core.windows.net/public --recursive.
Explanation:
To copy the contents of an on-premises server folder to a public container in an Azure Storage account, we need to use a tool called AzCopy. AzCopy is a command-line utility that allows you to copy data to and from Azure Storage. AzCopy can copy data between a file system and a storage account, or between storage accounts.
The command to copy the contents of D:\Folder1 to the public container in an Azure Storage account named contosodata is:
azcopy copy D:\folder1 https://contosodata.blob.core.windows.net/public --recursive
This command copies the contents of the D:\folder1 directory to the public container in the contosodata storage account, using the --recursive flag to copy all subdirectories and files within the folder.
Option A (https://contosodata.blob.core.windows.net/public) is not a valid command. It is a URL that points to the public container in the contosodata storage account.
Option B (azcopy sync D:\folder1 https://contosodata.blob.core.windows.net/public --snapshot) is incorrect. The azcopy sync command is used to synchronize files between a source and a destination. The --snapshot option is used to take a snapshot of the destination before the synchronization starts.
Option D (az storage blob copy start-batch D:\Folder1 https://contosodata.blob.core.windows.net/public) is also incorrect. The az storage blob copy start-batch command is used to start an asynchronous batch copy operation between a source and a destination. However, this command does not copy the contents of a local folder to a container in an Azure Storage account.