You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/storage/common/storage-ref-azcopy-copy.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: This article provides reference information for the azcopy copy com
4
4
author: normesta
5
5
ms.service: storage
6
6
ms.topic: reference
7
-
ms.date: 10/16/2019
7
+
ms.date: 04/10/2020
8
8
ms.author: normesta
9
9
ms.subservice: common
10
10
ms.reviewer: zezha-msft
@@ -164,6 +164,8 @@ Copy a subset of buckets by using a wildcard symbol (*) in the bucket name. Like
164
164
165
165
## Options
166
166
167
+
**--backup** Activates Windows' SeBackupPrivilege for uploads, or SeRestorePrivilege for downloads, to allow AzCopy to see read all files, regardless of their file system permissions, and to restore all permissions. Requires that the account running AzCopy already has these permissions (e.g. has administrator rights or is a member of the 'Backup Operators' group). All this flag does is activate privileges that the account already has.
168
+
167
169
**--blob-type** string Defines the type of blob at the destination. This is used for uploading blobs and when copying between accounts (default 'Detect'). Valid values include 'Detect', 'BlockBlob', 'PageBlob', and 'AppendBlob'. When copying between accounts, a value of 'Detect' causes AzCopy to use the type of source blob to determine the type of the destination blob. When uploading a file, 'Detect' determines if the file is a VHD or a VHDX file based on the file extension. If the file is ether a VHD or VHDX file, AzCopy treats the file as a page blob. (default "Detect")
168
170
169
171
**--block-blob-tier** string Upload block blobs directly to the [access tier](../blobs/storage-blob-storage-tiers.md) of your choice. (default 'None'). Valid values include 'None', 'Hot', 'Cool', and 'Archive'. If 'None' or no tier is passed, the blob will inherit the tier of the storage account.
@@ -218,6 +220,12 @@ Copy a subset of buckets by using a wildcard symbol (*) in the bucket name. Like
218
220
219
221
**--preserve-last-modified-time** Only available when destination is file system.
220
222
223
+
**--preserve-smb-permissions** string False by default. Preserves SMB ACLs between aware resources (Windows and Azure Files). For downloads, you will also need to use the `--backup` flag to restore permissions where the new Owner will not be the user that is running AzCopy. This flag applies to both files and folders, unless a file-only filter is specified (e.g. `include-pattern`).
224
+
225
+
**--preserve-smb-info** string False 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 will be transferred; any others will be ignored. This flag applies to both files and folders, unless a file-only filter is specified (e.g. include-pattern). The information transferred for folders is the same as that for files, except for Last Write Time which is never preserved for folders.
226
+
227
+
**--preserve-owner** Only has an effect in when downloading data, and only when the `--preserve-smb-permissions` is used. If true (the default), the file Owner and Group are preserved in downloads. If this flag is set to false, `--preserve-smb-permissions` will still preserve ACLs but Owner and Group will be based on the user that is running AzCopy.
228
+
221
229
**--put-md5** Create an MD5 hash of each file, and save the hash as the Content-MD5 property of the destination blob or file. (By default the hash is NOT created.) Only available when uploading.
222
230
223
231
**--recursive** Look into sub-directories recursively when uploading from local file system.
Copy file name to clipboardExpand all lines: articles/storage/common/storage-use-azcopy-blobs.md
+43-23Lines changed: 43 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: This article contains a collection of AzCopy example commands that
4
4
author: normesta
5
5
ms.service: storage
6
6
ms.topic: conceptual
7
-
ms.date: 10/22/2019
7
+
ms.date: 04/10/2020
8
8
ms.author: normesta
9
9
ms.subservice: common
10
10
ms.reviewer: dineshm
@@ -14,6 +14,9 @@ ms.reviewer: dineshm
14
14
15
15
AzCopy is a command-line utility that you can use to copy data to, from, or between storage accounts. This article contains example commands that work with Blob storage.
16
16
17
+
> [!TIP]
18
+
> The examples in this article enclose path arguments with single quotes (''). Use single quotes in all command shells except for the Windows Command Shell (cmd.exe). If you're using a Windows Command Shell (cmd.exe), enclose path arguments with double quotes ("") instead of single quotes ('').
19
+
17
20
## Get started
18
21
19
22
See the [Get started with AzCopy](storage-use-azcopy-v10.md) article to download AzCopy and learn about the ways that you can provide authorization credentials to the storage service.
@@ -27,9 +30,6 @@ See the [Get started with AzCopy](storage-use-azcopy-v10.md) article to download
27
30
28
31
## Create a container
29
32
30
-
> [!TIP]
31
-
> The examples in this section enclose path arguments with single quotes (''). Use single quotes in all command shells except for the Windows Command Shell (cmd.exe). If you're using a Windows Command Shell (cmd.exe), enclose path arguments with double quotes ("") instead of single quotes ('').
32
-
33
33
You can use the [azcopy make](storage-ref-azcopy-make.md) command to create a container. The examples in this section create a container named `mycontainer`.
34
34
35
35
|||
@@ -52,10 +52,16 @@ This section contains the following examples:
52
52
> * Upload the contents of a directory
53
53
> * Upload specific files
54
54
55
-
For detailed reference docs, see [azcopy copy](storage-ref-azcopy-copy.md).
56
-
57
55
> [!TIP]
58
-
> The examples in this section enclose path arguments with single quotes (''). Use single quotes in all command shells except for the Windows Command Shell (cmd.exe). If you're using a Windows Command Shell (cmd.exe), enclose path arguments with double quotes ("") instead of single quotes ('').
56
+
> You can tweak your upload operation by using optional flags. Here's a few examples.
57
+
>
58
+
> |Scenario|Flag|
59
+
> |---|---|
60
+
> |Upload files as Append Blobs or Page Blobs.|**--blob-type**=\[BlockBlob\|PageBlob\|AppendBlob\]|
61
+
> |Upload to a specific access tier (such as the archive tier).|**--block-blob-tier**=\[None\|Hot\|Cool\|Archive\]|
> For a complete list, see [options](storage-ref-azcopy-copy.md#options).
59
65
60
66
### Upload a file
61
67
@@ -67,10 +73,6 @@ For detailed reference docs, see [azcopy copy](storage-ref-azcopy-copy.md).
67
73
68
74
You can also upload a file by using a wildcard symbol (*) anywhere in the file path or file name. For example: `'C:\myDirectory\*.txt'`, or `C:\my*\*.txt`.
69
75
70
-
> [!NOTE]
71
-
> AzCopy by default uploads data as block blobs. To upload files as Append Blobs or Page Blobs, use the flag `--blob-type=[BlockBlob|PageBlob|AppendBlob]`.
72
-
> AzCopy by default uploads your data to inherit the account access tier. To upload files to a specific [access tier](../blobs/storage-blob-storage-tiers.md), use the flag `--block-blob-tier=[Hot|Cool|Archive]`.
73
-
74
76
### Upload a directory
75
77
76
78
This example copies a directory (and all of the files in that directory) to a blob container. The result is a directory in the container by the same name.
@@ -147,14 +149,20 @@ This section contains the following examples:
147
149
> * Download the contents of a directory
148
150
> * Download specific files
149
151
152
+
> [!TIP]
153
+
> You can tweak your download operation by using optional flags. Here's a few examples.
> |Specify how detailed you want your copy-related log entries to be.|**--log-level**=\[WARNING\|ERROR\|INFO\|NONE\]|
159
+
> |Specify if and how to overwrite the conflicting files and blobs at the destination.|**--overwrite**=\[true\|false\|ifSourceNewer\|prompt\]|
160
+
>
161
+
> For a complete list, see [options](storage-ref-azcopy-copy.md#options).
162
+
150
163
> [!NOTE]
151
164
> If the `Content-md5` property value of a blob contains a hash, AzCopy calculates an MD5 hash for downloaded data and verifies that the MD5 hash stored in the blob's `Content-md5` property matches the calculated hash. If these values don't match, the download fails unless you override this behavior by appending `--check-md5=NoCheck` or `--check-md5=LogOnly` to the copy command.
152
165
153
-
For detailed reference docs, see [azcopy copy](storage-ref-azcopy-copy.md).
154
-
155
-
> [!TIP]
156
-
> The examples in this section enclose path arguments with single quotes (''). Use single quotes in all command shells except for the Windows Command Shell (cmd.exe). If you're using a Windows Command Shell (cmd.exe), enclose path arguments with double quotes ("") instead of single quotes ('').
157
-
158
166
### Download a file
159
167
160
168
|||
@@ -240,12 +248,18 @@ This section contains the following examples:
240
248
> * Copy a container to another storage account
241
249
> * Copy all containers, directories, and files to another storage account
242
250
243
-
For detailed reference docs, see [azcopy copy](storage-ref-azcopy-copy.md).
251
+
These examples also work with accounts that have a hierarchical namespace. [Multi-protocol access on Data Lake Storage](../blobs/data-lake-storage-multi-protocol-access.md) enables you to use the same URL syntax (`blob.core.windows.net`) on those accounts.
244
252
245
253
> [!TIP]
246
-
> The examples in this section enclose path arguments with single quotes (''). Use single quotes in all command shells except for the Windows Command Shell (cmd.exe). If you're using a Windows Command Shell (cmd.exe), enclose path arguments with double quotes ("") instead of single quotes ('').
247
-
248
-
These examples also work with accounts that have a hierarchical namespace. [Multi-protocol access on Data Lake Storage](../blobs/data-lake-storage-multi-protocol-access.md) enables you to use the same URL syntax (`blob.core.windows.net`) on those accounts.
254
+
> You can tweak your copy operation by using optional flags. Here's a few examples.
255
+
>
256
+
> |Scenario|Flag|
257
+
> |---|---|
258
+
> |Copy files as Append Blobs or Page Blobs.|**--blob-type**=\[BlockBlob\|PageBlob\|AppendBlob\]|
259
+
> |Copy to a specific access tier (such as the archive tier).|**--block-blob-tier**=\[None\|Hot\|Cool\|Archive\]|
> For a complete list, see [options](storage-ref-azcopy-copy.md#options).
249
263
250
264
### Copy a blob to another storage account
251
265
@@ -301,10 +315,16 @@ If you set the `--delete-destination` flag to `true` AzCopy deletes files withou
301
315
> [!NOTE]
302
316
> To prevent accidental deletions, make sure to enable the [soft delete](https://docs.microsoft.com/azure/storage/blobs/storage-blob-soft-delete) feature before you use the `--delete-destination=prompt|true` flag.
303
317
304
-
For detailed reference docs, see [azcopy sync](storage-ref-azcopy-sync.md).
305
-
306
318
> [!TIP]
307
-
> The examples in this section enclose path arguments with single quotes (''). Use single quotes in all command shells except for the Windows Command Shell (cmd.exe). If you're using a Windows Command Shell (cmd.exe), enclose path arguments with double quotes ("") instead of single quotes ('').
319
+
> You can tweak your sync operation by using optional flags. Here's a few examples.
320
+
>
321
+
> |Scenario|Flag|
322
+
> |---|---|
323
+
> |Specify how strictly MD5 hashes should be validated when downloading.|**--check-md5**=\[NoCheck\|LogOnly\|FailIfDifferent\|FailIfDifferentOrMissing\]|
324
+
> |Exclude files based on a pattern.|**--exclude-path**|
325
+
> |Specify how detailed you want your sync-related log entries to be.|**--log-level**=\[WARNING\|ERROR\|INFO\|NONE\]|
326
+
>
327
+
> For a complete list, see [options](storage-ref-azcopy-sync.md#options).
308
328
309
329
### Update a container with changes to a local file system
0 commit comments