Overview on Azure Blob Storage

Azure storage offers four different service to store data

  1. Blobs
  2. Table
  3. Queue
  4. File

Blob refers to Binary Large OBject.

Blob storage can be opted for storing large amounts of unstructured object data such as text , video’s, audio’s ,images and binary data.

1. Block blobs

  • These are blocks of data that can be managed individually.
  • Can be used to store text and binary Data

2. Append blobs

  • These are like block blobs optimized for append operations
  • Ideal for logging data

3.Page blobs

  • These are optimized for random read and write access
  • can be used for storing disk files
  • Hot → can be used when data accessed frequently (can be set at account level)
  • cool → can be used for infrequent access of data and when the data is stored for at least 30 days (can be set at account level)
  • Archive → can be used for rare access of data and when the data is stored for at least 180 days(can be set at blob level)

Before archiving , note that data will be inaccessible until it is rehydrated back to hot or cool which may take several hours.

storage cost → archive < cool < hot
Access cost → archive > cool > hot

Containers are used to organize blobs, just like a folder.

Container access level:

  • private ( no anonymous access)
  • blob ( anonymous read access for blobs)
  • container ( anonymous read access for containers & blobs)

Name of resource group — rgname

Name of storage account — samplestracc

Name of Container — samplecontainer

Name of blob — samplefile

  • create storage account
    az storage account create — name samplestracc — resource-group rgname — location WestUS — sku Standard_LRS
  • create container in storgae account (access level will be private)
    az storage container create — account-name samplestracc — name samplecontainer
  • Create blob in container (access tier will be hot)
    az storage blob upload — account-name samplestracc — name samplecontainer — name samplefile.txt
  • Set access level to access blob (access level -blob)
    az storage container set-permission — account-name samplestracc — name samplecontainer — public-access-blob
  • List all blobs under a container
    az storage blob list — account-name samplestracc — name samplecontainer — output table
  • Download blob
    az storage blob download — account-name samplestracc — name samplecontainer — name samplefile.txt — file samplefile.txt