Skip to content

Commit 6445038

Browse files
author
Jill Grant
authored
Merge pull request #276894 from normesta/azcopy
Updating reference articles based on new AzCopy release
2 parents fd403cb + 7dd8972 commit 6445038

7 files changed

+111
-40
lines changed

articles/storage/common/storage-ref-azcopy-bench.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: This article provides reference information for the azcopy bench co
44
author: normesta
55
ms.service: azure-storage
66
ms.topic: reference
7-
ms.date: 03/29/2024
7+
ms.date: 05/31/2024
88
ms.author: normesta
99
ms.subservice: storage-common-concepts
1010
ms.reviewer: zezha-msft
@@ -45,24 +45,40 @@ azcopy bench [destination] [flags]
4545

4646
## Examples
4747

48-
Run an upload benchmark with default parameters (suitable for benchmarking networks up to 1 Gbps):
48+
Run an upload benchmark with default parameters (suitable for benchmarking networks up to 1 Gbps).
4949

5050
`azcopy bench "https://[account].blob.core.windows.net/[container]?<SAS>"`
5151

52-
Run a benchmark test that uploads 100 files, each 2 GiB in size: (suitable for benchmarking on a fast network, e.g. 10 Gbps):'
52+
Run an upload benchmark with a specified block size of 2 MiB and check the length of files after the transfer.
53+
54+
`azcopy bench "https://[account].blob.core.windows.net/[container]?<SAS>" --block-size-mb 2 --check-length`
55+
56+
Run a benchmark test that uploads 500 files. Each file is 500 MiB in size, and the log level is set to display only errors.
57+
58+
`azcopy bench "https://[account].blob.core.windows.net/[container]?<SAS>" --file-count 500 --size-per-file 500M --log-level ERROR`
59+
60+
Run a benchmark test that uploads 100 files. Each file is 2 GiB in size. This is suitable for benchmarking on a fast network (For example: 10 Gbps).
5361

5462
`azcopy bench "https://[account].blob.core.windows.net/[container]?<SAS>" --file-count 100 --size-per-file 2G`
5563

56-
Same as above, but use 50,000 files, each 8 MiB in size and compute their MD5 hashes (in the same way that the --put-md5 flag does this
57-
in the copy command). The purpose of --put-md5 when benchmarking is to test whether MD5 computation affects throughput for the selected file count and size:
64+
The next example is the same as above, but with 50,000 files. Each file 8 MiB in size. This example also computes the MD5 hashes of each file similar to the way that the --put-md5 flag computes the MD5 in the azcopy copy command. The purpose of --put-md5 when benchmarking is to test whether MD5 computation affects throughput for the
65+
selected file count and size.
5866

5967
`azcopy bench --mode='Upload' "https://[account].blob.core.windows.net/[container]?<SAS>" --file-count 50000 --size-per-file 8M --put-md5`
6068

61-
Run a benchmark test that downloads existing files from a target
69+
Run a benchmark test that uploads 1000 files and creates folders to divide up the data. Each file is 100 KiB in size.
70+
71+
`azcopy bench "https://[account].blob.core.windows.net/[container]?<SAS>" --file-count 1000 --size-per-file 100K --number-of-folders 5`
72+
73+
Run a benchmark test that downloads existing files from a target.
6274

6375
`azcopy bench --mode='Download' "https://[account].blob.core.windows.net/[container]?<SAS?"`
6476

65-
Run an upload that doesn't delete the transferred files. (These files can then serve as the payload for a download test)
77+
Run a download benchmark with the default parameters and cap the transfer rate at 500 Mbps.
78+
79+
`azcopy bench --mode=Download "https://[account].blob.core.windows.net/[container]?<SAS>" --cap-mbps 500`
80+
81+
Run an upload that does not delete the transferred files. These files can then serve as the payload for a download test.
6682

6783
`azcopy bench "https://[account].blob.core.windows.net/[container]?<SAS>" --file-count 100 --delete-test-data=false`
6884

articles/storage/common/storage-ref-azcopy-copy.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: This article provides reference information for the azcopy copy com
44
author: normesta
55
ms.service: azure-storage
66
ms.topic: reference
7-
ms.date: 03/29/2024
7+
ms.date: 05/31/2024
88
ms.author: normesta
99
ms.subservice: storage-common-concepts
1010
ms.reviewer: zezha-msft
@@ -144,7 +144,7 @@ Download a subset of containers within a storage account by using a wildcard sym
144144

145145
`azcopy cp "https://[srcaccount].blob.core.windows.net/[container*name]" "/path/to/dir" --recursive`
146146

147-
Download all the versions of a blob from Azure Storage to local directory. Ensure that source is a valid blob, destination is a local folder and `versionidsFile` which takes in a path to the file where each version is written on a separate line. All the specified versions get downloaded in the destination folder specified.
147+
Download all the versions of a blob from Azure Storage listed in a text file (For example: `versionidsFile`) to local directory. Ensure that source is a valid blob, destination is a local folder and `versionidsFile` is a text file where each version is written on a separate line. All the specified versions get downloaded in the destination folder specified.
148148

149149
`azcopy cp "https://[srcaccount].blob.core.windows.net/[containername]/[blobname]" "/path/to/dir" --list-of-versions="/another/path/to/dir/[versionidsFile]"`
150150

@@ -220,6 +220,16 @@ Copy a subset of buckets by using a wildcard symbol (*) in the bucket name from
220220

221221
`azcopy cp "https://storage.cloud.google.com/[bucket*name]/" "https://[destaccount].blob.core.windows.net/?[SAS]" --recursive=true`
222222

223+
To copy files changed before or after the AzCopy job has started, AzCopy provides date and time in the job log in ISO8601 format (search for 'ISO 8601 START TIME' in the job log) that can be used with the `--include-after` and `--include-before` flags, see examples below. This is helpful for incremental copies.
224+
225+
Copy a subset of files modified on or after the given date and time (in ISO8601 format) in a container by using the `include-after` flag.
226+
227+
`azcopy cp "https://[srcaccount].blob.core.windows.net/[containername]?[SAS]" "https://[dstaccount].blob.core.windows.net/[containername]?[SAS]" --include-after='2020-08-19T15:04:00Z''"`
228+
229+
Copy a subset of files modified on or before the given date and time (in ISO8601 format) in a container by using the `include-before` flag.
230+
231+
`azcopy cp "https://[srcaccount].blob.core.windows.net/[containername]?[SAS]" "https://[dstaccount].blob.core.windows.net/[containername]?[SAS]" --include-before='2020-08-19T15:04:00Z'"`
232+
223233
## Options
224234

225235
`--as-subdir` True by default. Places folder sources as subdirectories under the destination. (default true)
@@ -250,18 +260,20 @@ Copy a subset of buckets by using a wildcard symbol (*) in the bucket name from
250260

251261
`--cpk-by-name` (string) Client provided key by name that gives clients making requests against Azure Blob storage an option to provide an encryption key on a per-request basis. Provided key name is fetched from Azure Key Vault and is used to encrypt the data
252262

253-
`--cpk-by-value` Client provided key by name that lets clients making requests against Azure Blob storage an option to provide an encryption key on a per-request basis. Provided key and its hash is fetched from environment variables
263+
`--cpk-by-value` False by default. Client provided key by name that lets clients making requests against Azure Blob storage an option to provide an encryption key on a per-request basis. Provided key and its hash is fetched from environment variables
254264

255265
`--decompress` Automatically decompress files when downloading, if their content-encoding indicates that they're compressed. The supported content-encoding values are 'gzip' and 'deflate'. File extensions of '.gz'/'.gzip' or '.zz' aren't necessary, but is removed if present.
256266

257267
`--disable-auto-decoding` False by default to enable automatic decoding of illegal chars on Windows. Can be set to true to disable automatic decoding.
258268

259-
`--dry-run` Prints the file paths that would be copied by this command. This flag doesn't copy the actual files. The --overwrite flag has no effect. If you set the --overwrite flag to false, files in the source directory are listed even if those files exist in the destination directory.
269+
`--dry-run` False by default. Prints the file paths that would be copied by this command. This flag doesn't copy the actual files. The --overwrite flag has no effect. If you set the --overwrite flag to false, files in the source directory are listed even if those files exist in the destination directory.
260270

261271
`--exclude-attributes` (string) (Windows only) Exclude files whose attributes match the attribute list. For example: A;S;R
262272

263273
`--exclude-blob-type` (string) Optionally specifies the type of blob (BlockBlob/ PageBlob/ AppendBlob) to exclude when copying blobs from the container or the account. Use of this flag isn't applicable for copying data from non azure-service to service. More than one blob should be separated by ';'.
264274

275+
`--exclude-container` (string) Exclude these containers when transferring from account to account only. Multiple containers can be separated with ';'.
276+
265277
`--exclude-path` (string) Exclude these paths when copying. This option doesn't support wildcard characters (*). Checks relative path prefix(For example: myFolder;myFolder/subDirName/file.pdf). When used in combination with account traversal, paths don't include the container name.
266278

267279
`--exclude-pattern` (string) Exclude these files when copying. This option supports wildcard characters (*)
@@ -292,8 +304,6 @@ Copy a subset of buckets by using a wildcard symbol (*) in the bucket name from
292304

293305
`--list-of-versions` (string) Specifies a file where each version ID is listed on a separate line. Ensure that the source must point to a single blob and all the version IDs specified in the file using this flag must belong to the source blob only. AzCopy will download the specified versions in the destination folder provided.
294306

295-
`--log-level` (string) Define the log verbosity for the log file, available levels: INFO(all requests/responses), WARNING(slow responses), ERROR(only failed requests), and NONE(no output logs). (default 'INFO'). (default "INFO")
296-
297307
`--metadata` (string) Upload to Azure Storage with these key-value pairs as metadata.
298308

299309
`--no-guess-mime-type` Prevents AzCopy from detecting the content-type based on the extension or content of the file.
@@ -310,6 +320,8 @@ Copy a subset of buckets by using a wildcard symbol (*) in the bucket name from
310320

311321
`--preserve-permissions` False by default. Preserves ACLs between aware resources (Windows and Azure Files, or Azure Data Lake Storage Gen2 to Azure Data Lake Storage Gen2). For accounts that have a hierarchical namespace, your security principal must be the owning user of the target container or it must be assigned the Storage Blob Data Owner role, scoped to the target container, storage account, parent resource group, or subscription. For downloads, you'll also need the `--backup` flag to restore permissions where the new Owner won't be the user running AzCopy. This flag applies to both files and folders, unless a file-only filter is specified (for example, include-pattern).
312322

323+
`--preserve-posix-properties` False by default. Preserves property info gleaned from `stat` or `statx` into object metadata.
324+
313325
`--preserve-smb-info` For SMB-aware locations, flag is set to true by default. Preserves SMB property info (last write time, creation time, attribute bits) between SMB-aware resources (Windows and Azure Files). Only the attribute bits supported by Azure Files are transferred; any others are ignored. This flag applies to both files and folders, unless a file-only filter is specified (for example, include-pattern). The info transferred for folders is the same as that for files, except for `Last Write Time` which is never preserved for folders. (default true)
314326

315327
`--preserve-symlinks` If enabled, symlink destinations are preserved as the blob content, rather than uploading the file or folder on the other end of the symlink.
@@ -326,15 +338,19 @@ Copy a subset of buckets by using a wildcard symbol (*) in the bucket name from
326338

327339
`--s2s-preserve-access-tier` Preserve access tier during service to service copy. Refer to [Azure Blob storage: hot, cool, and archive access tiers](/azure/storage/blobs/storage-blob-storage-tiers) to ensure destination storage account supports setting access tier. In the cases that setting access tier isn't supported, make sure to use s2sPreserveAccessTier=false to bypass copying access tier. (default true). (default true)
328340

329-
`--s2s-preserve-blob-tags` Preserve index tags during service to service transfer from one blob storage to another
341+
`--s2s-preserve-blob-tags` False by default. Preserve index tags during service to service transfer from one blob storage to another
330342

331343
`--s2s-preserve-properties` Preserve full properties during service to service copy. For AWS S3 and Azure File non-single file source, the list operation doesn't return full properties of objects and files. To
332344
preserve full properties, AzCopy needs to send one more request per object or file. (default true)
333345

346+
`--trailing-dot` Enabled by default to treat file share related operations in a safe manner. Available options: `Enable`, `Disable`. Choose `Disable` to go back to legacy (potentially unsafe) treatment of trailing dot files where the file service will trim any trailing dots in paths. This can result in potential data corruption if the transfer contains two paths that differ only by a trailing dot (For example `mypath` and `mypath.`). If this flag is set to `Disable` and AzCopy encounters a trailing dot file, it will warn customers in the scanning log but will not attempt to abort the operation. If the destination does not support trailing dot files (Windows or Blob Storage), AzCopy will fail if the trailing dot file is the root of the transfer and skip any trailing dot paths encountered during enumeration.
347+
334348
## Options inherited from parent commands
335349

336350
`--cap-mbps` (float) Caps the transfer rate, in megabits per second. Moment-by-moment throughput might vary slightly from the cap. If this option is set to zero, or it's omitted, the throughput isn't capped.
337351

352+
`--log-level` (string) Define the log verbosity for the log file, available levels: INFO(all requests/responses), WARNING(slow responses), ERROR(only failed requests), and NONE(no output logs). (default 'INFO'). (default "INFO")
353+
338354
`--output-type` (string) Format of the command's output. The choices include: text, json. The default value is 'text'. (default "text")
339355

340356
`--trusted-microsoft-suffixes` (string) Specifies additional domain suffixes where Microsoft Entra login tokens can be sent. The default is '*.core.windows.net;*.core.chinacloudapi.cn;*.core.cloudapi.de;*.core.usgovcloudapi.net;*.storage.azure.net'. Any listed here are added to the default. For security, you should only put Microsoft Azure domains here. Separate multiple entries with semi-colons.

articles/storage/common/storage-ref-azcopy-list.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: This article provides reference information for the azcopy list com
44
author: normesta
55
ms.service: azure-storage
66
ms.topic: reference
7-
ms.date: 05/26/2022
7+
ms.date: 05/31/2024
88
ms.author: normesta
99
ms.subservice: storage-common-concepts
1010
ms.reviewer: zezha-msft
@@ -38,13 +38,17 @@ azcopy list [containerURL] --properties [semicolon(;) separated list of attribut
3838

3939
`-h`, `--help` Help for list
4040

41-
`--machine-readable` Lists file sizes in bytes.
41+
`--location` Optionally specifies the location. For Example: `Blob`,`File`, `BlobFS`.
4242

43-
`--mega-units` Displays units in orders of 1000, not 1024.
43+
`--machine-readable` False by default. Lists file sizes in bytes.
4444

45-
`--properties` (string) delimiter (;) separated values of properties required in list output.
45+
`--mega-units` False by default. Displays units in orders of 1000, not 1024.
4646

47-
`--running-tally` Counts the total number of files and their sizes.
47+
`--properties` Properties to be displayed in list output. Possible properties include: `LastModifiedTime`, `VersionId`, `BlobType`, `BlobAccessTier`, `ContentType`, `ContentEncoding`, `ContentMD5`, `LeaseState`, `LeaseDuration`, `LeaseStatus`, `ArchiveStatus`. Delimiter (;) should be used to separate multiple values of properties (For example: 'LastModifiedTime;VersionId;BlobType').
48+
49+
`--running-tally` False by default. Counts the total number of files and their sizes.
50+
51+
`--trailing-dot` Enabled by default to treat file share related operations in a safe manner. Available options: `Enable`, `Disable`. Choose `Disable` to go back to legacy (potentially unsafe) treatment of trailing dot files where the file service will trim any trailing dots in paths. This can result in potential data corruption if the transfer contains two paths that differ only by a trailing dot (For example `mypath` and `mypath.`). If this flag is set to `Disable` and AzCopy encounters a trailing dot file, it will warn customers in the scanning log but will not attempt to abort the operation. If the destination does not support trailing dot files (Windows or Blob Storage), AzCopy will fail if the trailing dot file is the root of the transfer and skip any trailing dot paths encountered during enumeration.
4852

4953
## Options inherited from parent commands
5054

0 commit comments

Comments
 (0)