MCPcopy Index your code
hub / github.com/Azure/azure-storage-azcopy

github.com/Azure/azure-storage-azcopy @v10.32.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release v10.32.4 ↗ · + Follow
6,373 symbols 31,713 edges 531 files 1,580 documented · 25%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

AzCopy v10

AzCopy v10 is a command-line utility that you can use to copy data to and from containers and file shares in Azure Storage accounts. AzCopy V10 presents easy-to-use commands that are optimized for high performance and throughput.

Features and capabilities

:white_check_mark: Use with storage accounts that have a hierarchical namespace (Azure Data Lake Storage Gen2).

:white_check_mark: Create containers and file shares.

:white_check_mark: Upload files and directories.

:white_check_mark: Download files and directories.

:white_check_mark: Copy containers, directories and blobs between storage accounts (Service to Service).

:white_check_mark: Synchronize data between Local <=> Blob Storage, Blob Storage <=> File Storage, and Local <=> File Storage.

:white_check_mark: Delete blobs or files from an Azure storage account

:white_check_mark: Copy objects, directories, and buckets from Amazon Web Services (AWS) to Azure Blob Storage (Blobs only).

:white_check_mark: Copy objects, directories, and buckets from Google Cloud Platform (GCP) to Azure Blob Storage (Blobs only).

:white_check_mark: List files in a container.

:white_check_mark: Recover from failures by restarting previous jobs.

Download AzCopy

The latest binary for AzCopy along with installation instructions may be found here.

Find help

For complete guidance, visit any of these articles on the docs.microsoft.com website.

:eight_spoked_asterisk: Get started with AzCopy (download links here)

:eight_spoked_asterisk: Upload files to Azure Blob storage by using AzCopy

:eight_spoked_asterisk: Download blobs from Azure Blob storage by using AzCopy

:eight_spoked_asterisk: Copy blobs between Azure storage accounts by using AzCopy

:eight_spoked_asterisk: Synchronize between Local File System/Azure Blob Storage (Gen1)/Azure File Storage by using AzCopy

:eight_spoked_asterisk: Transfer data with AzCopy and file storage

:eight_spoked_asterisk: Transfer data with AzCopy and Amazon S3 buckets

:eight_spoked_asterisk: Transfer data with AzCopy and Google GCP buckets

:eight_spoked_asterisk: Use data transfer tools in Azure Stack Hub Storage

:eight_spoked_asterisk: Configure, optimize, and troubleshoot AzCopy

:eight_spoked_asterisk: AzCopy WiKi

Supported Operations

The general format of the AzCopy commands is: azcopy [command] [arguments] --[flag-name]=[flag-value]

  • bench - Runs a performance benchmark by uploading or downloading test data to or from a specified destination

  • copy - Copies source data to a destination location. The supported directions and forms of authorization are: Source | Destination --- | --- Local | Azure Blob (Microsoft Entra ID or SAS) Local | Azure Files SMB (Microsoft Entra ID or share/directory SAS) Local | Azure Files NFS (Microsoft Entra ID or share/directory SAS) Local | Azure Data Lake Storage (Microsoft Entra ID, SAS, or Shared Key) Azure Blob (Microsoft Entra ID or SAS) | Local Azure Files SMB (Microsoft Entra ID or share/directory SAS) | Local Azure Files NFS (Microsoft Entra ID or share/directory SAS) | Local Azure Data Lake Storage (Microsoft Entra ID, SAS, or Shared Key) | Local Azure Blob (Microsoft Entra ID, SAS, or public) | Azure Blob (Microsoft Entra ID or SAS) Azure Blob (Microsoft Entra ID, SAS, or public) | Azure Files SMB (Microsoft Entra ID or SAS) Azure Blob (Microsoft Entra ID or SAS) | Azure Data Lake Storage (Microsoft Entra ID or SAS) Azure Data Lake Storage (Microsoft Entra ID or SAS) | Azure Blob (Microsoft Entra ID or SAS) Azure Data Lake Storage (Microsoft Entra ID or SAS) | Azure Data Lake Storage (Microsoft Entra ID or SAS) Azure Files SMB (Microsoft Entra ID or SAS) | Azure Blob (Microsoft Entra ID or SAS) Azure Files SMB (Microsoft Entra ID or SAS) | Azure Files SMB (Microsoft Entra ID or SAS) Azure Files NFS (Microsoft Entra ID or SAS) | Azure Files NFS (Microsoft Entra ID or SAS) AWS S3 (Access Key) | Azure Block Blob (Microsoft Entra ID or SAS) Google Cloud Storage (Service Account Key) | Azure Block Blob (Microsoft Entra ID or SAS)

  • sync - Replicate source to the destination location. The supported directions and forms of authorization are: Source | Destination --- | --- Local | Azure Blob (Microsoft Entra ID or SAS) Local | Azure File (Microsoft Entra ID or SAS) Azure Blob (Microsoft Entra ID or SAS) | Local Azure File (Microsoft Entra ID or SAS) | Local Azure Blob (Microsoft Entra ID or SAS) | Azure Blob (Microsoft Entra ID or SAS) Azure Blob (Microsoft Entra ID or SAS) | Azure File (Microsoft Entra ID or SAS) Azure Data Lake Storage (Microsoft Entra ID or SAS) | Azure Data Lake Storage (Microsoft Entra ID or SAS) Azure File (Microsoft Entra ID or SAS) | Azure Blob (Microsoft Entra ID or SAS) Azure File (SAS or public) | Azure File (SAS)

  • login - Log in to Azure Active Directory (AD) to access Azure Storage resources.* logout - Log out to terminate access to Azure Storage resources.

  • list - List the entities in a given resource

  • doc - Generates documentation for the tool in Markdown format

  • env - Shows the environment variables that you can use to configure the behavior of AzCopy.

  • help - Help about any command

  • jobs - Sub-commands related to managing jobs

  • load - Sub-commands related to transferring data in specific formats

  • make - Create a container or file share.

  • remove - Delete blobs or files from an Azure storage account

Find help from your command prompt

For convenience, consider adding the AzCopy directory location to your system path for ease of use. That way you can type azcopy from any directory on your system.

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

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

AzCopy command help example

If you choose not to add AzCopy to your path, you'll have to change directories to the location of your AzCopy executable and type azcopy or .\azcopy in Windows PowerShell command prompts.

Frequently asked questions

What is the difference between sync and copy?

  • The copy command is a simple transferring operation. It scans/enumerates the source and attempts to transfer every single file/blob present on the source to the destination. The supported source/destination pairs are listed in the help message of the tool.

  • On the other hand, sync scans/enumerates both the source, and the destination to find the incremental change. It makes sure that whatever is present in the source will be replicated to the destination. For sync,

  • If your goal is to simply move some files, then copy is definitely the right command, since it offers much better performance. If the use case is to incrementally transfer data (files present only on source) then sync is the better choice, since only the modified/missing files will be transferred. Since sync enumerates both source and destination to find the incremental change, it is relatively slower as compared to copy

Will copy overwrite my files?

By default, AzCopy will overwrite the files at the destination if they already exist. To avoid this behavior, please use the flag --overwrite=false.

Will sync overwrite my files?

By default, AzCopy sync use last-modified-time to determine whether to transfer the same file present at both the source, and the destination. i.e, If the source file is newer compared to the destination file, we overwrite the destination You can change this default behaviour and overwrite files at the destination by using the flag --mirror-mode=true

Will 'sync' delete files in the destination if they no longer exist in the source location?

By default, the 'sync' command doesn't delete files in the destination unless you use an optional flag with the command. To learn more, see Synchronize files.

How to contribute to AzCopy v10

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Extension points exported contracts — how you extend this code

ResourceTraverser (Interface)
capable of traversing a structured resource like container or local directory pass each StoredObject to the given object [12 …
traverser/zc_enumerator.go
JobErrorHandler (Interface)
JobErrorHandler defines a simple interface for handling errors that occur during the job lifecycle. This interface allo [17 …
common/lifecyleMgr.go
Assertion (Interface)
====== Assertion ====== [6 implementers]
e2etest/newe2e_asserter.go
ISourceInfoProvider (Interface)
ISourceInfoProvider is the abstraction of generic source info provider which provides source's properties. [4 implementers]
ste/sourceInfoProvider.go
ILogger (Interface)
(no doc) [6 implementers]
common/logger.go
ResourceManager (Interface)
(no doc) [14 implementers]
e2etest/newe2e_resource_manager_interface.go
ResumeJobHandler (Interface)
ResumeJobHandler defines the interface for handling resume job events. [3 implementers]
azcopy/jobsResume.go
HashDataAdapter (Interface)
HashDataAdapter implements an interface to pull and set hash data on files based upon a relative path [3 implementers]
common/hash_data.go

Core symbols most depended-on inside this repo

add_flags
called by 580
testSuite/scripts/utility.py
pointerTo
called by 544
e2etest/helpers.go
add_arguments
called by 505
testSuite/scripts/utility.py
String
called by 432
cmd/list.go
File
called by 427
common/fe-ste-models.go
Blob
called by 313
common/fe-ste-models.go
Error
called by 292
cmd/uihooks.go
f
called by 288
e2etest/declarativeTestFiles.go

Shape

Method 3,799
Function 1,674
Struct 634
Interface 131
TypeAlias 96
FuncType 29
Class 10

Languages

Go96%
Python4%

Modules by API surface

common/fe-ste-models.go399 symbols
ste/mgr-JobPartTransferMgr.go178 symbols
ste/mgr-JobMgr.go107 symbols
ste/testJobPartTransferManager_test.go90 symbols
ste/mgr-JobPartMgr.go86 symbols
e2etest/declarativeResourceManagers.go81 symbols
traverser/zc_newobjectadapters.go73 symbols
e2etest/newe2e_resource_manager_mock.go72 symbols
e2etest/newe2e_resource_manager_interface.go72 symbols
cmd/zt_scenario_helpers_for_test.go72 symbols
cmd/zt_test.go71 symbols
e2etest/newe2e_resource_managers_blob.go69 symbols

For agents

$ claude mcp add azure-storage-azcopy \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page