To copy data to or from an Azure Storage Account (General-purpose V2 Block Blob), use this guide to understand and perform the copy.
Important
If you need to share the generated SAS URL, you need to send the URL securely, using encrypted mail message, or via SMS.
NEVER send the URL in clear text, as the URL is the key to the storage account, for the defined set of time.
PREPARE STORAGE ACCOUNT
- Create the storage account.
- Type: General-Purpose V2
- Region: use West Europe in most cases
- Redundancy: Standard LRS
- Access tier: Hot
- Networking: Enable public access from selected virtual networks and IP addresses (approve your own IP and the IPs that will connect to the storage account)
- Leave all other settings default and create the storage account
- After creation, go to the storage account, and select Containers.
- Create new private container, call it transfer-folder (all lowercase letters).
- Navigate to the newly created container.
- Select Shared Access Tokens.
- Generate new SAS and set required permissions
PREPARE AZCOPY
Define start and end date for the SAS. Make sure the SAS does not expire before copy job is finished.
Now press Generate SAS token and URL.
7. Copy the blob SAS URL to a notepad or other placeholder of your chosing.
- Download AzCopy from Microsoft: https://aka.ms/downloadazcopy-v10-windows
- Extract AzCopy to a work folder of your chosing.
- Open CMD or PowerShell as Admin, and navigate to the folder where azcopy.exe is located.
COPY DATA WITH AZ COPY – FROM LOCAL DISK TO STORAGE ACCOUNT
- Prepare the AzCopy command. You need to specify the source path and destination path, there destination path is the SAS URL from blob storage.
azcopy copy "C:\local\path" "INSERT_BLOB-SAS-URL_HERE" --recursive=true
- Run the AzCopy command in the CMD or PowerShell window you opened before.
- Monitor the proces, and wait for finish.
COPY DATA WITH AZ COPY – FROM FROM STORAGE ACCOUNT TO LOCAL DISK
- Prepare the AzCopy command. You need to specify the source path and destination path, there source path is the SAS URL from blob storage.
azcopy copy "INSERT_BLOB-SAS-URL_HERE" "C:\local\path" --recursive=true
- Run the AzCopy command in the CMD or PowerShell window you opened before.
- Monitor the proces, and wait for finish.
Comments