Safely back up your files
5 stars based on
You can copy data between a file system and a storage account, or between storage accounts. There are two versions of AzCopy that you can download.
AzCopy on Windows is built with. NET Framework, and offers Windows style command-line options. AzCopy on Linux is built with. This article covers AzCopy on Windows. Download the latest version of AzCopy on Windows. After installing AzCopy on Windows using the installer, open a command window and navigate to the AzCopy installation directory on your computer - storage options software download the AzCopy.
If desired, you can add the AzCopy installation location to your system path. The following examples demonstrate a variety of scenarios for copying data to and from Microsoft Azure Blobs, Files, and Tables.
Refer to the AzCopy Parameters section for a detailed explanation of the parameters used in each sample. Note that if the folder C: Note that you must have read-access geo-redundant storage enabled storage options software download access the secondary region.
After the download operation, the directory C: Assume the following blobs reside in the specified container. All blobs beginning with the prefix a are downloaded:. The prefix storage options software download to the virtual directory, which forms the first part storage options software download the blob name. In the example shown above, the virtual directory does not match the specified prefix, so storage options software download is not downloaded.
You can also exclude blobs from the download operation based on their last-modified storage options software download. If the specified destination container does not exist, AzCopy creates it and uploads the file into it. If the specified virtual directory does not exist, AzCopy uploads the file to include the virtual directory in its name e. For instance, assume the following files reside in folder C: After the upload operation, the container includes the following files:.
Beginning with version 3. This syntax sets the content type for all blobs in an upload operation. When you copy a blob within a Storage account, a server-side copy operation is performed. When you copy a blob across Storage options software download accounts, a server-side copy operation is performed. After the copy operation, the target container includes the blob and its snapshots.
Assuming the blob in the example above has two snapshots, the container includes the following blob and snapshots:. See Upload all blobs in a folder for more information and an example. AzCopy by default copies data between two storage endpoints asynchronously. Therefore, the copy operation runs in the background using spare storage options software download capacity that has no SLA in terms of how fast a blob is copied, and AzCopy periodically checks storage options software download copy status until the copying is completed or failed.
AzCopy performs the synchronous copy by downloading the blobs to copy from the specified source to local memory, and then uploading them to the Blob storage destination. If the specified source is an Azure File share, then you must either specify the exact file name, e.
When you copy a file across file shares, a server-side copy operation is performed. When storage options software download copy a file from file share to blob, a server-side copy operation is performed. When you copy a file from a blob to a file share, a server-side copy operation is performed. Standard egress cost applies. The recommended approach is to use this option in the Azure VM which is in the same region as your source storage account to avoid egress cost.
AzCopy writes a manifest file to the specified destination folder. The manifest file is used in the import process to locate the necessary data files and perform data validation.
The manifest file uses the following naming convention by default:. AzCopy uses a volume index in the split data file names to distinguish multiple files. The volume index consists of two parts, a partition key range index and a split file index. Both indexes are zero-based. The resulting data file names might be:. Each operation exports one partition key range.
NC at the command line. The generated JSON data file follows the payload format for minimal metadata. Note that when exporting tables to blobs, AzCopy downloads the Table entities to local temporary data files and then uploads those entities to the blob. Both of these files must come from an AzCopy table export. To avoid errors, please do not modify the exported JSON or manifest file. Assume a Blob container contains the following: You can run the following command to import entities into a table using the manifest file in that blob container:.
If you only want to copy source resources that don't exist in the destination, you can specify both parameters in the AzCopy command:. You can include any AzCopy command-line parameters in a response file.
AzCopy processes the parameters in the file as if they had been specified on the command storage options software download, performing a direct substitution with the contents storage options software download the file. Assume a response file named copyoperation.
Each AzCopy parameter can be specified on a single storage options software download. And a response file named dest. To call AzCopy with these response files, all of which reside in a directory C: AzCopy processes this command just storage options software download it would if you included all of the individual parameters on the storage options software download line:.
Each time you issue a command to AzCopy, it checks whether a journal file exists in the default folder, or whether it exists in a folder that you specified via this option. If the journal file does not exist in either place, AzCopy treats the operation as new and generates a new journal file. If the journal file does exist, AzCopy checks whether the command line that you input matches the command line in the storage options software download file.
If the two command lines match, AzCopy resumes the incomplete operation. If they do not match, you are prompted to either overwrite the journal file to start a new operation, or to cancel the current operation. If the storage options software download file already exists, then AzCopy resumes the operation based on the journal file. This example creates the journal file if it does not already exist.
If it does exist, then AzCopy resumes the operation based on the journal file. By default, AzCopy starts a certain number of concurrent operations to increase the data transfer throughput. For Table operations, the number of concurrent operations is equal to the number of processors you have. For Blob and File operations, the number of concurrent operations is equal 8 times the number of processors you have.
Parameters for AzCopy are described below. You can also type one of the following commands from the command line for help in using AzCopy:. Specifies the source storage options software download from which to copy. The source can be a file system directory, a blob container, a blob virtual directory, a storage file share, a storage file directory, or an Storage options software download table.
Specifies the destination to copy to. The destination can be a file system directory, a blob container, a blob virtual directory, a storage file share, a storage file directory, or an Azure table. Specifies a file pattern that indicates which files to copy. If the specified source is a directory in the file system, then standard wildcards are in effect, and the file pattern provided is matched against files within the directory.
If the specified source is a blob container or virtual directory, then wildcards are not applied. If the specified source is an Azure file share, then you must either specify the exact file name, e. The default file pattern used when storage options software download file pattern is specified is. Specifying multiple file patterns is not supported. Surround the SAS with double quotes, as it may contains special command-line characters.
If the destination resource is a blob container, file share or table, you can either specify this option followed by the SAS token, or you can specify the SAS as part of the destination blob container, file share or table's URI, without this option.
If the source and destination are both blobs, then the destination blob must reside within the same storage account as the source blob. If the source resource is a blob container, and neither a key nor a SAS is provided, then the blob container is read via anonymous access.
Specifies recursive mode for copy operations. In recursive mode, Storage options software download copies all blobs or files that match the specified file pattern, including those in subfolders.
Specifies whether the destination blob is a block blob, a page blob, or an append blob. This option is applicable only when you are uploading a blob. Otherwise, an error is generated. If the destination is a blob and this option is not specified, by default, AzCopy creates a block blob. Storage options software download an MD5 hash for downloaded data and verifies that the MD5 hash stored in the blob or file's Content-MD5 property storage options software download the calculated hash.
The MD5 check is turned off by default, so you must specify this option to perform the MD5 check when downloading data. Note that Azure Storage doesn't guarantee that the MD5 hash stored for the blob or file is up-to-date. It is client's responsibility to update the MD5 whenever the blob or file is modified.