Edit

Share via


Get started with AzCopy

AzCopy is a command-line utility that you can use to copy data to, from, or between storage accounts. This article helps you download AzCopy, connect to your storage account, and then transfer data.

AzCopy V10 is the currently supported version of AzCopy. It's supported only on versions of Windows, Linux, or macOS that are officially maintained. If you need to use a previous version of AzCopy, see the Use the previous version of AzCopy section of this article.

AzCopy use cases

Use AzCopy to copy your data to, from, or between Azure storage accounts. Common use cases include:

  • Copying data from an on-premises source to an Azure storage account
  • Copying data from an Azure storage account to an on-premises source
  • Copying data from one storage account to another storage account

AzCopy supports each use case with commands and options. For example, AzCopy has native commands for copying or synchronizing data. This support makes AzCopy a flexible tool that you can use for one-time copy activities and ongoing synchronization scenarios. You can target specific storage services such as Azure Blob Storage or Azure Files, and you can also copy between them. For example, you can copy data from Azure Blob Storage containers to Azure File shares or vice versa.

For a complete list of data transfer guides, see the Transfer data section of this article.

Get AzCopy

If you're using AzCopy on a Linux machine, you can use a package manager. For all other operating systems, download a portable binary file. For detailed information on AzCopy releases, see the AzCopy release page.

Use a package manager (Linux only)

Installing AzCopy through your Linux distribution's package manager is the most convenient and maintainable way to get this tool. Package manager installation includes automatic dependency resolution, simplified updates, and integration with your system's software management. For step-by-step guidance, see Install AzCopy on Linux by using a package manager.

Download a portable binary

An installation package is available only for Linux. For all other operating systems, you can download the AzCopy V10 executable file to any directory on your computer.

These files are compressed as a zip file (Windows and Mac) or a tar file (Linux). To download and decompress the tar file on Linux, see the documentation for your Linux distribution.

Note

If you want to copy data to and from your Azure Table storage service, install AzCopy version 7.3.

Add AzCopy to your system path

For convenience, consider adding the directory location of the AzCopy executable to your system path. That way you can type azcopy from any directory on your system. If you don't add the AzCopy directory to your path, you need to change directories to the location of your AzCopy executable and type azcopy or .\azcopy in a command shell.

Authorize AzCopy

As an owner of your Azure Storage account, you aren't automatically assigned permissions to access data. Before you can do anything meaningful with AzCopy, you need to decide how you'll provide authorization credentials to the storage service. You can provide credentials by using Microsoft Entra ID or by using a SAS token.

Authorize with Microsoft Entra ID

By using Microsoft Entra ID, you can provide credentials once instead of having to append a SAS token to each command. Start by choosing what type of security principal you want to authorize. Use the following table as a guide.

Security principal Guidance
User identity Authorize access for AzCopy with a user identity
Managed identity Authorize access for AzCopy with a managed identity
Service principal Authorize access for AzCopy with a service principal

Authorize with a SAS token

You can append a SAS token to each source or destination URL that you use in your AzCopy commands. This example command recursively copies data from a local directory to a blob container. A fictitious SAS token is appended to the end of the container URL.

azcopy copy "C:\local\path" "https://account.blob.core.windows.net/mycontainer1/?sv=2018-03-28&ss=bjqt&srt=sco&sp=rwddgcup&se=2019-05-01T05:01:17Z&st=2019-04-30T21:01:17Z&spr=https&sig=MGCXiyEzbtttkr3ewJIh2AR8KrghSy1DGM9ovN734bQF4%3D" --recursive=true

To learn more about SAS tokens and how to obtain one, see Using shared access signatures (SAS).

Transfer data

After you authorize your identity or obtain a SAS token, you can start transferring data.

For example commands, see any of these articles.

Service Article
Azure Blob Storage Upload files to Azure Blob Storage
Azure Blob Storage Download blobs from Azure Blob Storage
Azure Blob Storage Copy blobs between Azure storage accounts
Azure Blob Storage Synchronize with Azure Blob Storage
Azure Files Transfer data with AzCopy and file storage
Amazon S3 Copy data from Amazon S3 to Azure Storage
Google Cloud Storage Copy data from Google Cloud Storage to Azure Storage (preview)
Azure Stack storage Transfer data with AzCopy and Azure Stack storage

You can run AzCopy commands interactively. You can also incorporate AzCopy into automated scripts for batch operations, scheduled data transfers, or continuous integration pipelines. For more information, see Use AzCopy in scripts and scheduled transfers.

Note

AzCopy does not support scenarios where the source or destination is being actively changed during the transfer.

Get command help

To see a list of commands, type azcopy -h and then press the ENTER key.

To learn about a specific command, include the name of the command (For example: azcopy list -h).

Inline help

List of commands

The following table lists all AzCopy v10 commands. Each command links to a reference article.

Command Description
azcopy bench Runs a performance benchmark by uploading or downloading test data to or from a specified location.
azcopy copy Copies source data to a destination location
azcopy doc Generates documentation for the tool in Markdown format.
azcopy env Shows the environment variables that can configure AzCopy's behavior.
azcopy jobs Subcommands related to managing jobs.
azcopy jobs clean Removes all log and plan files for all jobs.
azcopy jobs list Displays information on all jobs.
azcopy jobs remove Removes all files associated with the given job ID.
azcopy jobs resume Resumes the existing job with the given job ID.
azcopy jobs show Shows detailed information for the given job ID.
azcopy list Lists the entities in a given resource.
azcopy login Signs in to Microsoft Entra ID to access Azure Storage resources.
azcopy login status Lists the entities in a given resource.
azcopy logout Signs the user out and terminates access to Azure Storage resources.
azcopy make Creates a container or file share.
azcopy remove Deletes blobs or files from an Azure storage account.
azcopy sync Replicates the source location to the destination location.
azcopy set-properties Changes the access tier of one or more blobs and replaces (overwrites) the metadata and index tags of one or more blobs.

Note

AzCopy doesn't have a command to rename files.

Configure, optimize, and fix

See any of the following resources:

Use a previous version (deprecated)

If you need to use a previous version of AzCopy, see either of the following links:

Note

These versions of AzCopy are deprecated. Microsoft recommends using AzCopy v10.

Next steps

If you have questions, issues, or general feedback, submit them on GitHub.