Подія
31 бер., 23 - 2 квіт., 23
Найбільша подія навчання Fabric, Power BI і SQL. 31 березня – 2 квітня. Щоб заощадити 400 грн, скористайтеся кодом FABINSIDER.
Реєструйтеся сьогодніЦей браузер більше не підтримується.
Замініть його на Microsoft Edge, щоб користуватися перевагами найновіших функцій, оновлень безпеки та технічної підтримки.
AzCopy is a command-line utility that you can use to copy blobs or files to or from a storage account. This article helps you download AzCopy, connect to your storage account, and then transfer data.
Примітка
AzCopy V10 is the currently supported version of AzCopy. The tool is not supported on versions of Windows, Linux, or macOS that are no longer officially maintained.
If you need to use a previous version of AzCopy, see the Use the previous version of AzCopy section of this article.
This video shows you how to download and run the AzCopy utility.
The steps in the video are also described in the following sections.
AzCopy can be used to copy your data to, from, or between Azure storage accounts. Common use cases include:
Each of these use cases has unique options. For example, AzCopy has native commands for copying and/or synchronizing data. This makes AzCopy a flexible tool that can be used for one-time copy activities and ongoing synchronization scenarios. AzCopy also allows you to target specific storage services such as Azure Blob Storage or Azure Files. This allows you to copy data from blob to file, file to blob, file to file, etc.
To learn more about these scenarios, see:
Примітка
AzCopy does not support scenarios where the source or destination is being actively changed during the transfer.
You can install AzCopy by using a Linux package that is hosted on the Linux Software Repository for Microsoft Products.
Download the repository configuration package.
Важливо
Make sure to replace the distribution and version with the appropriate strings.
curl -sSL -O https://packages.microsoft.com/config/<distribution>/<version>/packages-microsoft-prod.rpm
Install the repository configuration package.
sudo rpm -i packages-microsoft-prod.rpm
Delete the repository configuration package after you've installed it.
rm packages-microsoft-prod.rpm
Update the package index files.
sudo dnf update
Install AzCopy.
sudo dnf install azcopy
As an alternative to installing a package, 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.
For detailed information on AzCopy releases, see the AzCopy release page.
Примітка
If you want to copy data to and from your Azure Table storage service, then install AzCopy version 7.3.
For convenience, consider adding the directory location of the AzCopy executable to your system path for ease of use. That way you can type azcopy
from any directory on your system.
If you choose not to add the AzCopy directory 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.
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 authorization credentials by using Microsoft Entra ID, or by using a Shared Access Signature (SAS) token.
By using Microsoft Entra ID, you can provide credentials once instead of having to append a SAS token to each command.
You can append a SAS token to each source or destination URL that 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).
Примітка
The Secure transfer required setting of a storage account determines whether the connection to a storage account is secured with Transport Layer Security (TLS). This setting is enabled by default.
After you've authorized your identity or obtained a SAS token, you can begin transferring data.
To find 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 |
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
).
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 | Remove all log and plan files for all jobs. |
azcopy jobs list | Displays information on all jobs. |
azcopy jobs remove | Remove 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 | Logs in to Microsoft Entra ID to access Azure Storage resources. |
azcopy login status | Lists the entities in a given resource. |
azcopy logout | Logs the user out and terminates access to Azure Storage resources. |
azcopy make | Creates a container or file share. |
azcopy remove | Delete blobs or files from an Azure storage account. |
azcopy sync | Replicates the source location to the destination location. |
azcopy set-properties | Change the access tier of one or more blobs and replace (overwrite) the metadata, and index tags of one or more blobs. |
Примітка
AzCopy does not have a command to rename files.
Over time, the AzCopy download link will point to new versions of AzCopy. If your script downloads AzCopy, the script might stop working if a newer version of AzCopy modifies features that your script depends upon.
To avoid these issues, obtain a static (unchanging) link to the current version of AzCopy. That way, your script downloads the same exact version of AzCopy each time that it runs.
Примітка
The static link to AzCopy binaries is subject to change over time due to our content delivery infrastructure. If you must use a specific version of AzCopy for any reason, we recommend using AzCopy with an operating system that leverages a published package. This method ensures that you can reliably install and maintain the desired version of AzCopy.
To obtain the link, run this command:
Operating system | Command |
---|---|
Linux | curl -s -D- https://aka.ms/downloadazcopy-v10-linux \| grep ^Location |
Windows PowerShell | (Invoke-WebRequest -Uri https://aka.ms/downloadazcopy-v10-windows -MaximumRedirection 0 -ErrorAction SilentlyContinue).headers.location |
PowerShell 6.1+ | (Invoke-WebRequest -Uri https://aka.ms/downloadazcopy-v10-windows -MaximumRedirection 0 -ErrorAction SilentlyContinue -SkipHttpErrorCheck).headers.location |
Примітка
For Linux, --strip-components=1
on the tar
command removes the top-level folder that contains the version name, and instead extracts the binary directly into the current folder. This allows the script to be updated with a new version of azcopy
by only updating the wget
URL.
The URL appears in the output of this command. Your script can then download AzCopy by using that URL.
Linux
wget -O azcopy_v10.tar.gz https://aka.ms/downloadazcopy-v10-linux && tar -xf azcopy_v10.tar.gz --strip-components=1
Windows PowerShell
Invoke-WebRequest -Uri <URL from the previous command> -OutFile 'azcopyv10.zip'
Expand-archive -Path '.\azcopyv10.zip' -Destinationpath '.\'
$AzCopy = (Get-ChildItem -path '.\' -Recurse -File -Filter 'azcopy.exe').FullName
# Invoke AzCopy
& $AzCopy
PowerShell 6.1+
Invoke-WebRequest -Uri <URL from the previous command> -OutFile 'azcopyv10.zip'
$AzCopy = (Expand-archive -Path '.\azcopyv10.zip' -Destinationpath '.\' -PassThru | where-object {$_.Name -eq 'azcopy.exe'}).FullName
# Invoke AzCopy
& $AzCopy
In batch files that have the .cmd
extension, you'll have to escape the %
characters that appear in SAS tokens. You can do that by adding an extra %
character next to existing %
characters in the SAS token string. The resulting character sequence appears as %%
. Make sure to add an extra ^
before each &
character to create the character sequence ^&
.
If you plan to use Jenkins to run scripts, make sure to place the following command at the beginning of the script.
/usr/bin/keyctl new_session
Storage Explorer uses AzCopy to perform all of its data transfer operations. You can use Storage Explorer if you want to apply the performance advantages of AzCopy, but you prefer to use a graphical user interface rather than the command line to interact with your files.
Storage Explorer uses your account key to perform operations, so after you sign into Storage Explorer, you won't need to provide additional authorization credentials.
See any of the following resources:
If you need to use the previous version of AzCopy, see either of the following links:
Примітка
These versions AzCopy are been deprecated. Microsoft recommends using AzCopy v10.
If you have questions, issues, or general feedback, submit them on GitHub page.
Подія
31 бер., 23 - 2 квіт., 23
Найбільша подія навчання Fabric, Power BI і SQL. 31 березня – 2 квітня. Щоб заощадити 400 грн, скористайтеся кодом FABINSIDER.
Реєструйтеся сьогодніНавчання
Навчальний шлях
Запуск високопродуктивних обчислювальних програм (HPC) в Azure - Training
Azure HPC – це спеціально побудована хмарна можливість для навантаження HPC & AI, використовуючи передові процесори та взаємозв'язок InfiniBand класу HPC, щоб забезпечити найкращу продуктивність, масштабованість і значення програми. Azure HPC дає змогу користувачам розблоковувати інновації, продуктивність і гнучкість бізнесу за допомогою дуже доступного спектру технологій HPC & AI, які можуть динамічно виділятися в міру зміни ваших ділових і технічних потреб. Цей навчальний шлях – це ряд модулів, які допома
Сертифікація
Сертифікована корпорація Майкрософт: Azure Fundamentals - Certifications
Демонстрація основоположних знань про хмарні концепції, основні служби Azure, а також функції та інструменти керування Azure.
Документація
Upload files to Azure Blob storage by using AzCopy v10
This article contains a collection of AzCopy example commands that help you upload files to Azure Blob storage.
Transfer data to or from Azure Files by using AzCopy v10
Transfer data with AzCopy and file storage. AzCopy is a command-line tool for copying blobs or files to or from a storage account. Use AzCopy with Azure Files.
Authorize access to blobs & files with AzCopy & Microsoft Entra ID
You can provide authorization credentials for AzCopy operations by using Microsoft Entra ID.