Let’s begin step by step to implement this solution.
- Login to https://portal.azure.com
- Go to Create a resource (1) > Storage (2) > Create a new Storage account (3)
- Select the subscription to manage deployed resources and costs (4), select the resource group (5) or create a new one(6):
- Next, enter a name for your storage account(7). The name you choose must be unique across Azure. The name also must be between 3 and 24 characters in length and can include numbers and lowercase letters only. Note: The field can contain only lowercase letters and numbers. The name must be between 3 and 24 characters.
- Choose the location(8), in my case, will be East US.
- Choose the storage performance (9) between standard and premium, depends on what you need
- Standard storage accounts are backed by magnetic drives and provide the lowest cost per GB.
- Premium storage accounts are backed by solid state drives and offer consistent, low-latency performance.
- The account kind (10), in my case I will choose blob storage because has a good price, the price can be checked here Azure Data storage prices.
- Redundancy or replication (11), you have 3 options: Locally redundancy, Geo redundancy and Read access geo-redundancy, my choice is LRS because again it has a competitive price
- The account Access Tier (12) is the default tier that is inferred by any blob without an explicitly set tier. The Hot Access Tier is ideal for frequently accessed data, and the Cool Access Tier is ideal for infrequently accessed data. The Archive Access Tier can only be set at the blob level and not on the account. Select the access tier depending on your purpose.
- In the advanced tab, you have a security option (13), I recommend to enable it due to the following reasons: When you are using the Azure file service, connection without encryption will fail, including scenarios using SMB 2.1, SMB 3.0 without encryption, and some flavours of the Linux SMB client. In our scenario, the SMB 3.0 is needed.
- Virtual Networks (14), if you prefer that access to Blob storage should be allowed by a specific network, you should create them.
- And Hierarchical namespace (15), is for accelerates big data analytics workloads and enables file-level access control lists (ACLs).
- Add a tag to categorize resources and view consolidated billing by applying the same tag to multiple resources and resource groups.
- And the last one Review + create the configuration (16).
- Now we need to install the latest version of AzCopy on Windows.
- Start Powershell as Administrator, Start, in the Start menu, expand the Windows PowerShell folder, right-click Windows PowerShell ISE, click More, and then click Run as administrator. When prompted by User Account Control for confirmation, click Yes.
- In the Administrator: Windows PowerShell ISE window, if the script pane is not visible, click View and then, in the View menu, click Show Script Pane as below
- Set the location of AzCopy with the following command:
- Now we can AzCopy to upload on Azure storage using the command below, for syntax information type
/** PS C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy> .\AzCopy.exe /Dest:https://sacloudtechfileshare.blob.core.windows.net/fileshare /destkey:dWJDIxt3tDbUn5mdOm/Jl2tsOHRsQV/KVBY6qod/1n9L8F5dSB+UicHdvoOhpZ6NOe7XedTkRHQDto5PDOa/wg== /Source:C:\Data [2019/01/31 23:25:06][WARNING] To transfer a directory please specify recursive mode option /S or file pattern option /Pattern. Otherwise all files in the local source directory will be trans ferred in a non-recursive mode. [2019/01/31 23:25:13] Transfer summary: ----------------- Total files transferred: 8 Transfer successfully: 8 Transfer skipped: 0 Transfer failed: 0 Elapsed time: 00.00:00:08 PS C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy> */
- Now we can check on Azure Portal > Dashboard > sacloudtechfileshare – Blobs > fileshare, all the files were copied from C:\Data to https://sacloudtechfileshare.blob.core.windows.net/fileshare. The files, folder
- Specifying option
/S, you can uploads the contents of the specified directory to Blob storage recursively, meaning that all subfolders and their files are uploaded as well.
For additional info, please don’t hesitate to leave a comment or a question in the rubric Ask a question