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
+10-3Lines changed: 10 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,16 @@ 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: 05/26/2022
7
+
ms.date: 10/22/2022
8
8
ms.author: normesta
9
9
ms.subservice: common
10
10
ms.reviewer: zezha-msft
11
11
---
12
12
13
13
# azcopy copy
14
14
15
-
Copies source data to a destination location.
15
+
Copies source data to a destination location.
16
+
16
17
17
18
## Synopsis
18
19
@@ -48,6 +49,12 @@ If you set an environment variable by using the command line, that variable will
48
49
azcopy copy [source] [destination] [flags]
49
50
```
50
51
52
+
## Related conceptual articles
53
+
54
+
-[Get started with AzCopy](storage-use-azcopy-v10.md)
55
+
-[Transfer data with AzCopy and Blob storage](./storage-use-azcopy-v10.md#transfer-data)
56
+
-[Transfer data with AzCopy and file storage](storage-use-azcopy-files.md)
57
+
51
58
## Examples
52
59
53
60
Upload a single file by using OAuth authentication. If you haven't yet logged into AzCopy, please run the azcopy login command before you run the following command.
@@ -237,7 +244,7 @@ Copy a subset of buckets by using a wildcard symbol (*) in the bucket name from
237
244
238
245
`--content-type` (string) Specifies the content type of the file. Implies no-guess-mime-type. Returned on download.
239
246
240
-
`--cpk-by-name` (string) 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 name will be fetched from Azure Key Vault and will be used to encrypt the data
247
+
`--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 will be fetched from Azure Key Vault and will be used to encrypt the data
241
248
242
249
`--cpk-by-value` Client provided key by name that let clients making requests against Azure Blob storage an option to provide an encryption key on a per-request basis. Provided key and its hash will be fetched from environment variables
Copy file name to clipboardExpand all lines: articles/storage/common/storage-ref-azcopy-sync.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,13 @@ The sync command differs from the copy command in several ways:
29
29
2. When syncing between virtual directories, add a trailing slash to the path (refer to examples) if there's a blob with the same name as one of the virtual directories.
30
30
3. If the 'delete-destination' flag is set to true or prompt, then sync will delete files and blobs at the destination that aren't present at the source.
31
31
32
-
Advanced:
32
+
## Guidelines
33
+
34
+
[!INCLUDE [Azcopy sync command general guidelines](../../../includes/azure-storage-azcopy-sync-guidelines.md)]
35
+
36
+
- For Blob Storage, you can prevent accidental deletions by making sure to enable the [soft delete](../blobs/soft-delete-blob-overview.md) feature before you use the `--delete-destination=prompt|true` flag.
37
+
38
+
## Advanced
33
39
34
40
Note that if you don't specify a file extension, AzCopy automatically detects the content type of the files when uploading from the local disk, based on the file extension or content.
35
41
@@ -48,6 +54,12 @@ the header field Last-Modified is used instead of x-ms-file-change-time, which m
48
54
azcopy sync [flags]
49
55
```
50
56
57
+
## Related conceptual articles
58
+
59
+
-[Get started with AzCopy](storage-use-azcopy-v10.md)
60
+
-[Transfer data with AzCopy and Blob storage](./storage-use-azcopy-v10.md#transfer-data)
61
+
-[Transfer data with AzCopy and file storage](storage-use-azcopy-files.md)
Copy file name to clipboardExpand all lines: articles/storage/common/storage-use-azcopy-blobs-synchronize.md
+4-11Lines changed: 4 additions & 11 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: how-to
7
-
ms.date: 04/02/2021
7
+
ms.date: 10/02/2022
8
8
ms.author: normesta
9
9
ms.subservice: common
10
10
ms.reviewer: dineshm
@@ -32,17 +32,10 @@ See the [Get started with AzCopy](storage-use-azcopy-v10.md) article to download
32
32
33
33
## Guidelines
34
34
35
-
- The [sync](storage-ref-azcopy-sync.md) command compares file names and last modified timestamps. Set the `--delete-destination` optional flag to a value of `true` or `prompt` to delete files in the destination directory if those files no longer exist in the source directory.
36
-
37
-
- If you set the `--delete-destination` flag to `true`, AzCopy deletes files without providing a prompt. If you want a prompt to appear before AzCopy deletes a file, set the `--delete-destination` flag to `prompt`.
38
-
39
-
- If you plan to set the `--delete-destination` flag to `prompt` or `false`, consider using the [copy](storage-ref-azcopy-copy.md) command instead of the
40
-
[sync](storage-ref-azcopy-sync.md) command and set the `--overwrite` parameter to `ifSourceNewer`. The [copy](storage-ref-azcopy-copy.md) command consumes less memory and incurs less billing costs because a copy operation doesn't have to index the source or destination prior to moving files.
35
+
[!INCLUDE [Azcopy sync command general guidelines](../../../includes/azure-storage-azcopy-sync-guidelines.md)]
41
36
42
37
- To prevent accidental deletions, make sure to enable the [soft delete](../blobs/soft-delete-blob-overview.md) feature before you use the `--delete-destination=prompt|true` flag.
43
38
44
-
- The machine on which you run the sync command should have an accurate system clock because the last modified times are critical in determining whether a file should be transferred. If your system has significant clock skew, avoid modifying files at the destination too close to the time that you plan to run a sync command.
45
-
46
39
## Update a container with changes to a local file system
47
40
48
41
In this case, the container is the destination, and the local file system is the source.
## Update a container with changes in another container
81
74
82
-
The first container that appears in this command is the source. The second one is the destination. Make sure to append a a SAS token to each source URL.
75
+
The first container that appears in this command is the source. The second one is the destination. Make sure to append a SAS token to each source URL.
83
76
84
77
If you provide authorization credentials by using Azure Active Directory (Azure AD), you can omit the SAS token only from the destination URL. Make sure that you've set up the proper roles in your destination account. See [Option 1: Use Azure Active Directory](storage-use-azcopy-v10.md?toc=/azure/storage/blobs/toc.json#option-1-use-azure-active-directory).
## Update a directory with changes to a directory in another container
100
93
101
-
The first directory that appears in this command is the source. The second one is the destination. Make sure to append a a SAS token to each source URL.
94
+
The first directory that appears in this command is the source. The second one is the destination. Make sure to append a SAS token to each source URL.
102
95
103
96
If you provide authorization credentials by using Azure Active Directory (Azure AD), you can omit the SAS token only from the destination URL. Make sure that you've set up the proper roles in your destination account. See [Option 1: Use Azure Active Directory](storage-use-azcopy-v10.md?toc=/azure/storage/blobs/toc.json#option-1-use-azure-active-directory).
Copy file name to clipboardExpand all lines: articles/storage/common/storage-use-azcopy-files.md
+2-9Lines changed: 2 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Transfer data with AzCopy and file storage. AzCopy is a command-lin
4
4
author: normesta
5
5
ms.service: storage
6
6
ms.topic: how-to
7
-
ms.date: 09/29/2022
7
+
ms.date: 10/02/2022
8
8
ms.author: normesta
9
9
ms.subservice: common
10
10
---
@@ -425,14 +425,7 @@ You can synchronize the contents of a local file system with a file share or syn
425
425
426
426
### Guidelines
427
427
428
-
- The [sync](storage-ref-azcopy-sync.md) command compares file names and last modified timestamps. Set the `--delete-destination` optional flag to a value of `true` or `prompt` to delete files in the destination directory if those files no longer exist in the source directory.
429
-
430
-
- If you set the `--delete-destination` flag to `true`, AzCopy deletes files without providing a prompt. If you want a prompt to appear before AzCopy deletes a file, set the `--delete-destination` flag to `prompt`.
431
-
432
-
- If you plan to set the `--delete-destination` flag to `prompt` or `false`, consider using the [copy](storage-ref-azcopy-copy.md) command instead of the
433
-
[sync](storage-ref-azcopy-sync.md) command and set the `--overwrite` parameter to `ifSourceNewer`. The [copy](storage-ref-azcopy-copy.md) command consumes less memory and incurs less billing costs because a copy operation doesn't have to index the source or destination prior to moving files.
434
-
435
-
- The machine on which you run the sync command should have an accurate system clock because the last modified times are critical in determining whether a file should be transferred. If your system has significant clock skew, avoid modifying files at the destination too close to the time that you plan to run a sync command.
428
+
[!INCLUDE [Azcopy sync command general guidelines](../../../includes/azure-storage-azcopy-sync-guidelines.md)]
436
429
437
430
> [!TIP]
438
431
> You can tweak your sync operation by using optional flags. Here's a few examples.
The [sync](../articles/storage/common/storage-ref-azcopy-sync.md) command compares file names and last modified timestamps. Set the `--delete-destination` optional flag to a value of `true` or `prompt` to delete files in the destination directory if those files no longer exist in the source directory.
10
+
11
+
- If you set the `--delete-destination` flag to `true`, AzCopy deletes files without providing a prompt. If you want a prompt to appear before AzCopy deletes a file, set the `--delete-destination` flag to `prompt`.
12
+
13
+
- If you plan to set the `--delete-destination` flag to `prompt` or `false`, consider using the [copy](../articles/storage/common/storage-ref-azcopy-copy.md) command instead of the
14
+
[sync](../articles/storage/common/storage-ref-azcopy-sync.md) command and set the `--overwrite` parameter to `ifSourceNewer`. The [copy](../articles/storage/common/storage-ref-azcopy-copy.md) command consumes less memory and incurs less billing costs because a copy operation doesn't have to index the source or destination prior to moving files.
15
+
16
+
- The machine on which you run the sync command should have an accurate system clock because the last modified times are critical in determining whether a file should be transferred. If your system has significant clock skew, avoid modifying files at the destination too close to the time that you plan to run a sync command.
17
+
18
+
- AzCopy uses server-to-server APIs to synchronize data between storage accounts. That means that data is copied directly between storage servers. However, AzCopy does set up and monitor each transfer, and for larger storage accounts (For example, accounts that contain millions of blobs), AzCopy might require a substantial amount of compute resources to accomplish these tasks. Therefore, if you are running AzCopy from Virtual Machine (VM), make sure that the VM has enough cores/memory to handle the load.
0 commit comments