Skip to content

Commit 4e57aea

Browse files
authored
Merge pull request #79714 from normesta/normesta-azcopy
Normesta azcopy
2 parents 282765f + 1cd6b34 commit 4e57aea

File tree

2 files changed

+42
-28
lines changed

2 files changed

+42
-28
lines changed

articles/storage/common/storage-use-azcopy-configure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ To configure the proxy settings for AzCopy, set the `https_proxy` environment va
2727

2828
| Operating system | Command |
2929
|--------|-----------|
30-
| **Windows** | In a command prompt use: `set https_proxy=<proxy IP>:<proxy port>`<br> In PowerShell use: `$env:https_proxy=<proxy IP>:<proxy port>`|
30+
| **Windows** | In a command prompt use: `set https_proxy=<proxy IP>:<proxy port>`<br> In PowerShell use: `$env:https_proxy="<proxy IP>:<proxy port>"`|
3131
| **Linux** | `export https_proxy=<proxy IP>:<proxy port>` |
3232
| **MacOS** | `export https_proxy=<proxy IP>:<proxy port>` |
3333

articles/storage/common/storage-use-azcopy-v10.md

Lines changed: 41 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ To learn about a specific command, just include the name of the command (For exa
4444

4545
![Inline help](media/storage-use-azcopy-v10/azcopy-inline-help.png)
4646

47-
Before you can do anything meaningful with AzCopy, you need to decide how you'll provide authorization credentials to the storage service.
47+
> [!NOTE]
48+
> 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.
4849
4950
## Choose how you'll provide authorization credentials
5051

@@ -62,9 +63,9 @@ Use this table as a guide:
6263

6364
The level of authorization that you need is based on whether you plan to upload files or just download them.
6465

65-
#### Authorization to upload files
66+
If you just want to download files, then verify that the [Storage Blob Data Reader](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-blob-data-reader) has been assigned to your identity.
6667

67-
Verify that one of these roles has been assigned to your identity:
68+
If you want to upload files, then verify that one of these roles has been assigned to your identity:
6869

6970
- [Storage Blob Data Contributor](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-queue-data-contributor)
7071
- [Storage Blob Data Owner](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-blob-data-owner)
@@ -82,27 +83,6 @@ You don't need to have one of these roles assigned to your identity if your iden
8283

8384
To learn more, see [Access control in Azure Data Lake Storage Gen2](https://docs.microsoft.com/azure/storage/blobs/data-lake-storage-access-control).
8485

85-
#### Authorization to download files
86-
87-
Verify that one of these roles has been assigned to your identity:
88-
89-
- [Storage Blob Data Reader](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-blob-data-reader)
90-
- [Storage Blob Data Contributor](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-queue-data-contributor)
91-
- [Storage Blob Data Owner](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-blob-data-owner)
92-
93-
These roles can be assigned to your identity in any of these scopes:
94-
95-
- Container (file system)
96-
- Storage account
97-
- Resource group
98-
- Subscription
99-
100-
To learn how to verify and assign roles, see [Grant access to Azure blob and queue data with RBAC in the Azure portal](https://docs.microsoft.com/azure/storage/common/storage-auth-aad-rbac-portal?toc=%2fazure%2fstorage%2fblobs%2ftoc.json).
101-
102-
You don't need to have one of these roles assigned to your identity if your identity is added to the access control list (ACL) of the target container or directory. In the ACL, your identity needs read permission on the target directory, and execute permission on container and each parent directory.
103-
104-
To learn more, see [Access control in Azure Data Lake Storage Gen2](https://docs.microsoft.com/azure/storage/blobs/data-lake-storage-access-control).
105-
10686
#### Authenticate your identity
10787

10888
After you've verified that your identity has been given the necessary authorization level, open a command prompt, type the following command, and then press the ENTER key.
@@ -111,6 +91,14 @@ After you've verified that your identity has been given the necessary authorizat
11191
azcopy login
11292
```
11393

94+
If you belong to more than one organization, include the tenant ID of the organization to which the storage account belongs.
95+
96+
```azcopy
97+
azcopy login --tenant-id=<tenant-id>
98+
```
99+
100+
Replace the `<tenant-id>` placeholder with the tenant ID of the organization to which the storage account belongs. To find the tenant ID, select **Azure Active Directory > Properties > Directory ID** in the Azure portal.
101+
114102
This command returns an authentication code and the URL of a website. Open the website, provide the code, and then choose the **Next** button.
115103

116104
![Create a container](media/storage-use-azcopy-v10/azcopy-login.png)
@@ -141,13 +129,32 @@ To find example commands, see any of these articles.
141129

142130
- [Transfer data with AzCopy and Amazon S3 buckets](storage-use-azcopy-s3.md)
143131

144-
## Configure, optimize, and troubleshoot AzCopy
132+
## Use AzCopy in a script
145133

146-
See [Configure, optimize, and troubleshoot AzCopy](storage-use-azcopy-configure.md)
134+
Over time, the AzCopy [download link](#download-and-install-azcopy) 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.
135+
136+
To avoid these issues, obtain a static (un-changing) link to the current version of AzCopy. That way, your script downloads the same exact version of AzCopy each time that it runs.
137+
138+
To obtain the link, run this command:
139+
140+
| Operating system | Command |
141+
|--------|-----------|
142+
| **Linux** | `curl -v https://aka.ms/downloadazcopy-v10-linux` |
143+
| **Windows** | `(curl https://aka.ms/downloadazcopy-v10-windows -MaximumRedirection 0 -ErrorAction silentlycontinue).RawContent` |
144+
145+
> [!NOTE]
146+
> 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.
147+
148+
The URL appears in the output of this command. Your script can then download AzCopy by using that URL.
149+
150+
| Operating system | Command |
151+
|--------|-----------|
152+
| **Linux** | `wget -O azcopyv10.tar https://azcopyvnext.azureedge.net/release20190301/azcopy_linux_amd64_10.0.8.tar.gz tar -xf azcopyv10.tar --strip-components=1 ./azcopy` |
153+
| **Windows** | `Invoke-WebRequest https://azcopyvnext.azureedge.net/release20190517/azcopy_windows_amd64_10.1.2.zip -OutFile azcopyv10.zip <<Unzip here>>` |
147154

148155
## Use AzCopy in Storage Explorer
149156

150-
If you want to leverage the performance advantages of AzCopy, but you prefer to use Storage Explorer rather than the command line to interact with your files, then enable AzCopy in Storage Explorer.
157+
If you want to leverage the performance advantages of AzCopy, but you prefer to use Storage Explorer rather than the command line to interact with your files, then enable AzCopy in Storage Explorer.
151158

152159
In Storage Explorer, choose **Preview**->**Use AzCopy for Improved Blob Upload and Download**.
153160

@@ -156,15 +163,22 @@ In Storage Explorer, choose **Preview**->**Use AzCopy for Improved Blob Upload a
156163
> [!NOTE]
157164
> You don't have to enable this setting if you've enabled a hierarchical namespace on your storage account. That's because Storage Explorer automatically uses AzCopy on storage accounts that have a hierarchical namespace.
158165
166+
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.
167+
159168
<a id="previous-version" />
160169

161170
## Use the previous version of AzCopy
162171

163172
If you need to use the previous version of AzCopy (AzCopy v8.1), see either of the following links:
164173

165174
- [AzCopy on Windows (v8)](https://docs.microsoft.com/previous-versions/azure/storage/storage-use-azcopy)
175+
166176
- [AzCopy on Linux (v8)](https://docs.microsoft.com/previous-versions/azure/storage/storage-use-azcopy-linux)
167177

178+
## Configure, optimize, and troubleshoot AzCopy
179+
180+
See [Configure, optimize, and troubleshoot AzCopy](storage-use-azcopy-configure.md)
181+
168182
## Next steps
169183

170184
If you have questions, issues, or general feedback, submit them [on GitHub](https://github.com/Azure/azure-storage-azcopy) page.

0 commit comments

Comments
 (0)