Skip to content

Commit 2431604

Browse files
author
Jill Grant
authored
Merge pull request #234144 from sdwheeler/sdw-pr108000
Add instructions for upload/download in Cloud Shell
2 parents 85a4eca + 659bd30 commit 2431604

File tree

4 files changed

+55
-33
lines changed

4 files changed

+55
-33
lines changed
4.95 KB
Loading

articles/cloud-shell/persisting-shell-storage.md

Lines changed: 55 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ your behalf in the supported region that's nearest to you:
2626
- Storage account: `cs<uniqueGuid>`
2727
- fileshare: `cs-<user>-<domain>-com-<uniqueGuid>`
2828

29-
![Screenshot of choosing the subscription for your storage account][09]
29+
![Screenshot of choosing the subscription for your storage account.][06]
3030

3131
The fileshare mounts as `clouddrive` in your `$HOME` directory. This is a one-time action, and the
3232
fileshare mounts automatically in subsequent sessions.
@@ -47,9 +47,9 @@ and zone-redundant storage (ZRS) accounts.
4747
> [!NOTE]
4848
> Using GRS or ZRS storage accounts are recommended for additional resiliency for your backing file
4949
> share. Which type of redundancy depends on your goals and price preference.
50-
> [Learn more about replication options for Azure Storage accounts][04].
50+
> [Learn more about replication options for Azure Storage accounts][03].
5151
52-
![Screenshot of configuring your storage account][08]
52+
![Screenshot of configuring your storage account.][05]
5353

5454
## Securing storage access
5555

@@ -102,7 +102,7 @@ of their fileshare.
102102

103103
Storage accounts that you create in Cloud Shell are tagged with
104104
`ms-resource-usage:azure-cloud-shell`. If you want to disallow users from creating storage accounts
105-
in Cloud Shell, create an [Azure resource policy for tags][03] that is triggered by this specific
105+
in Cloud Shell, create an [Azure resource policy for tags][02] that is triggered by this specific
106106
tag.
107107

108108
## How Cloud Shell storage works
@@ -128,7 +128,7 @@ Cloud Shell persists files through both of the following methods:
128128
In Cloud Shell, you can run a command called `clouddrive`, which enables you to manually update the
129129
fileshare that's mounted to Cloud Shell.
130130

131-
![Screenshot of running the clouddrive command in bash][10]
131+
![Screenshot of running the clouddrive command in bash.][07]
132132

133133
### List `clouddrive`
134134

@@ -172,7 +172,7 @@ clouddrive mount -s mySubscription -g myRG -n storageAccountName -f fileShareNam
172172

173173
To view more details, run `clouddrive mount -h`, as shown here:
174174

175-
![Screenshot of running the clouddrive mount command in bash][11]
175+
![Screenshot of running the clouddrive mount command in bash.][12]
176176

177177
### Unmount clouddrive
178178

@@ -187,7 +187,7 @@ The unmounted fileshare continues to exist until you manually delete it. After u
187187
Shell no longer searches for this fileshare in subsequent sessions. To view more details, run
188188
`clouddrive unmount -h`, as shown here:
189189

190-
![Screenshot of running the clouddrive unmount command in bash][12]
190+
![Screenshot of running the clouddrive unmount command in bash.][13]
191191

192192
> [!WARNING]
193193
> Although running this command doesn't delete any resources, manually deleting a resource group,
@@ -201,7 +201,7 @@ Shell no longer searches for this fileshare in subsequent sessions. To view more
201201
The `Get-CloudDrive` cmdlet retrieves the Azure fileshare information currently mounted by the
202202
`clouddrive` in Cloud Shell.
203203

204-
![Screenshot of running the Get-CloudDrive command in PowerShell][07]
204+
![Screenshot of running the Get-CloudDrive command in PowerShell.][11]
205205

206206
### Unmount `clouddrive`
207207

@@ -212,54 +212,76 @@ Dismounting the `clouddrive` terminates the current session.
212212
If the Azure fileshare has been removed, you'll be prompted to create and mount a new Azure
213213
fileshare in the next session.
214214

215-
![Screenshot of running the Dismount-CloudDrive command in PowerShell][06]
215+
![Screenshot of running the Dismount-CloudDrive command in PowerShell.][08]
216216

217217
## Transfer local files to Cloud Shell
218218

219219
The `clouddrive` directory syncs with the Azure portal storage blade. Use this blade to transfer
220220
local files to or from your file share. Updating files from within Cloud Shell is reflected in the
221221
file storage GUI when you refresh the blade.
222222

223-
### Download files
223+
### Download files from the Azure portal
224+
225+
![Screenshot listing local files in the Azure portal.][09]
224226

225-
![Screenshot listing local files in the Azure portal][13]
226227
1. In the Azure portal, go to the mounted file share.
227-
2. Select the target file.
228-
3. Select the **Download** button.
228+
1. Select the target file.
229+
1. Select the **Download** button.
230+
231+
### Download files in Azure Cloud Shell
232+
233+
1. In an Azure Cloud Shell session, select the **Upload/Download files** icon and select the
234+
**Download** option.
235+
1. In the **Download a file** dialog, enter the path to the file you want to download.
236+
237+
![Screenshot of the download dialog box in Cloud Shell.][10]
238+
239+
You can only download files located under your `$HOME` folder.
240+
1. Click the **Download** button.
229241

230242
### Upload files
231243

232-
![Screenshot showing how to upload files in the Azure portal][14]
244+
![Screenshot showing how to upload files in the Azure portal.][14]
245+
233246
1. Go to your mounted file share.
234-
2. Select the **Upload** button.
235-
3. Select the file or files that you want to upload.
236-
4. Confirm the upload.
247+
1. Select the **Upload** button.
248+
1. Select the file or files that you want to upload.
249+
1. Confirm the upload.
237250

238251
You should now see the files that are accessible in your `clouddrive` directory in Cloud Shell.
239252

240253
> [!NOTE]
241254
> If you need to define a function in a file and call it from the PowerShell cmdlets, then the
242255
> dot operator must be included. For example: `. .\MyFunctions.ps1`
243256
257+
### Upload files in Azure Cloud Shell
258+
259+
1. In an Azure Cloud Shell session, select the **Upload/Download files** icon and select the
260+
**Upload** option.
261+
1. Your browser will open a file dialog. Select the file you want to upload then click the **Open**
262+
button.
263+
264+
The file is uploaded to the root of your `$HOME` folder. You can move the file after it's uploaded.
265+
244266
## Next steps
245267

246268
- [Cloud Shell Quickstart][15]
247-
- [Learn about Microsoft Azure Files storage][05]
248-
- [Learn about storage tags][02]
269+
- [Learn about Microsoft Azure Files storage][04]
270+
- [Learn about storage tags][01]
249271

250272
<!-- link references -->
251-
[01]: includes/cloud-shell-persisting-shell-storage-endblock.md
252-
[02]: ../azure-resource-manager/management/tag-resources.md
253-
[03]: ../governance/policy/samples/index.md
254-
[04]: ../storage/common/storage-redundancy.md
255-
[05]: ../storage/files/storage-files-introduction.md
256-
[06]: media/persisting-shell-storage/dismount-clouddrive.png
257-
[07]: media/persisting-shell-storage/get-clouddrive.png
258-
[08]: media/persisting-shell-storage/advanced-storage.png
259-
[09]: media/persisting-shell-storage/basic-storage.png
260-
[10]: media/persisting-shell-storage/clouddrive-h.png
261-
[11]: media/persisting-shell-storage/mount-h.png
262-
[12]: media/persisting-shell-storage/unmount-h.png
263-
[13]: media/persisting-shell-storage/download.png
264-
[14]: media/persisting-shell-storage/upload.png
273+
[01]: ../azure-resource-manager/management/tag-resources.md
274+
[02]: ../governance/policy/samples/index.md
275+
[03]: ../storage/common/storage-redundancy.md
276+
[04]: ../storage/files/storage-files-introduction.md
277+
[05]: media/persisting-shell-storage/advanced-storage.png
278+
[06]: media/persisting-shell-storage/basic-storage.png
279+
[07]: media/persisting-shell-storage/clouddrive-h.png
280+
[08]: media/persisting-shell-storage/dismount-clouddrive.png
281+
[09]: media/persisting-shell-storage/download-portal.png
282+
[10]: media/persisting-shell-storage/download-shell.png
283+
[11]: media/persisting-shell-storage/get-clouddrive.png
284+
[12]: media/persisting-shell-storage/mount-h.png
285+
[13]: media/persisting-shell-storage/unmount-h.png
286+
[14]: media/persisting-shell-storage/upload-portal.png
265287
[15]: quickstart.md

0 commit comments

Comments
 (0)