AZ-900: AzCopy – Azure Command-Line File Transfer Tool

AzCopy is a command-line utility that allows you to copy files or blobs to and from Azure storage accounts. It is a highly efficient and secure tool for transferring data and is commonly used by Azure administrators and developers.

What is AzCopy?

AzCopy is an executable file that doesn’t require full installation. You can run it directly on your operating system of choice, including Windows, Linux, or macOS. This tool is optimized for performance and is suitable for large-scale data migrations or routine transfers between storage accounts.

How to Use AzCopy

To use AzCopy, you simply download the executable and run it from the command line. In PowerShell, you may need to prefix commands with ./, for example ./azcopy, to ensure it runs correctly.

You can get help at any time using the -h switch, like azcopy -h. For help with specific commands, use --h after the command, such as azcopy copy --h.

Authorization Methods

To perform operations with AzCopy, you must first authorize access:

  • Blob Storage: You can authenticate using either Microsoft Entra ID or a Shared Access Signature (SAS) token.
  • File Storage: Only SAS tokens are supported.

SAS tokens are query strings that you append to a container or file URL, providing controlled access for a limited time.

Common Commands

Here are some of the most useful AzCopy commands:

  • azcopy login – Logs into Microsoft Entra ID for authentication.
  • azcopy logout – Ends the session.
  • azcopy copy – Copies files or blobs to a destination storage account.
  • azcopy remove – Deletes content from an Azure storage account.

Note that there is no command to rename files using AzCopy. You would need to copy the file with a new name and then remove the original.

Practical Use Cases

AzCopy is perfect for:

  • Transferring large datasets into or out of Azure Blob or File Storage.
  • Automating backup processes.
  • Syncing files between on-premises and cloud environments.

For copying files within Azure, you might also want to explore Azure File Sync.

Learn More

AzCopy complements other Azure storage services like Blob Storage, File Storage, and Disk Storage. Understanding how it fits into Azure’s broader storage architecture is essential for effective cloud resource management.


Would you like to see this in action? Visit our AZ-900 video course for guided demos and deeper insights – or click here to go back to the Microsoft AZ-900 list of topics.

Please click here to find out more about Microsoft’s AZ-900 exam.

author avatar
Datablog

Leave a Reply

Your email address will not be published. Required fields are marked *