Skip to main content

Azure Data Transfer

Overview

Use Mega to transfer data between Azure and your local machine.

Install Azure CLI

Open a terminal and ssh into your instance, or use the terminal in the Jupyter Notebook UI.

Then run the following command to install the Azure CLI.

### install azcopy
wget https://aka.ms/downloadazcopy-v10-linux
tar -xvf downloadazcopy-v10-linux
cp azcopy_linux_amd64_*/azcopy /usr/bin/

Download Data

Run the following command to download data from Azure to your instance.

### download folder
azcopy copy 'https://<storage-account-name>.blob.core.windows.net/<container-name>/?<SAS-token>' '/path/to/download' --recursive

### download file
azcopy copy 'https://<storage-account-name>.blob.core.windows.net/<container-name>/<file-name>?<SAS-token>' '/path/to/download'

reference: How-To-Get-SAS-Token

Upload Data

Run the following command to upload data from your instance to Azure.

### upload folder
azcopy copy '/path/to/upload' 'https://<storage-account-name>.blob.core.windows.net/<container-name>/?<SAS-token>' --recursive
### upload file
azcopy copy '/path/to/upload' 'https://<storage-account-name>.blob.core.windows.net/<container-name>/<file-name>?<SAS-token>'