Azure storage container tutorial

This Azure tutorial, we discussed on Azure storage container.

Azure Storage Container

Azure storage container groups together a set of blob objects, like a directory in a file system. A storage account can contain an unlimited number of containers, and a container can store an unlimited number of blobs.

Azure Blob objects

The Azure Storage service supports three types of blob:

  • The blobs blocks store text and binary data, up about 4.7 TB. They are composed of data blocks that can be managed individually.
  • Add blobs consist of blocks, like block blobs, but are optimized for add operations. Addition blobs are great for scenarios like logging data from virtual machines.
  • Page blob objects store random access files up to 8 TB in size. Page blob objects store virtual hard disk files and act as disks for Azure virtual machines. For more information on page blobs, see Azure page blobs overview.

Move data to Blob storage

Several solutions exist to migrate existing data to Blob storage:

AzCopy is an easy-to-use command line tool for Windows and Linux that copies data to and from Blob storage, between containers or between storage accounts. For more information on AzCopy, see Data transfer with AzCopy v10 (preview).

The Azure Storage data move library is a .NET library for moving data between Azure Storage services. The AzCopy utility is created with the data movement library. For more information, see the reference documentation for the data movement library.

Azure Data Factory supports copying data to and from Blob storage with an account key, shared access signature, service principal, or managed identities for Azure resources. For more information, see Copy data from/to Azure Data Lake Store using Azure Data Factory.

Blobfuse is a virtual file system driver for Blob Azure Storage. You can use blobfuse to access your existing block blob data in your storage account via the Linux file system. For more information, see How to Guide to Mount Blob Storage as a File System with Blobfuse.

The Azure Data Box service makes it possible to transfer local data to Blob storage when large data sets or network constraints make it impossible to load data via the network. Depending on the size of your data, you can request Azure Data Box Disk, Azure Data Box or Azure Data Box Heavy devices from Microsoft. You can then copy your data to these devices and send it to Microsoft, which will load it into Blob storage.

The Azure Import / Export service provides a way to import and export large amounts of data to and from your storage account using the hard drives you provide.

Create an Azure Blob Container

In Azure, a container is used to group a set of BLOBs. All blobs must be in a container. A container can store an unlimited number of blob objects. For the most recent information on storage size limits, see Using the Azure BLOB Object Storage Service in .net.

To create a container in Azure, follow these steps:

Log in to the Azure management portal.

Select the storage account, click the Containers tab, and then click Add container at the bottom of the screen to open a new dialog.

Enter the name of the container.

Select Private for the Access type. When you set up private access, the container and BLOB data can only be read by the owner of the Azure account.

Azure Storage Container

How to Create a container.

Blobs are always loaded into a container. This allows you to organize groups of blob objects as you organize your files in folders on your computer.

To create a container, expand the storage account created in the previous step. Select Blob Containers, right-click, and then select Create Blob Container.

Enter the name of your blob container. See the Create a container section for a list of rules and restrictions for blob container names.

When you’re done, press Enter to create the blob container. Once the container is created, it appears under the Blob Containers folder corresponding to the selected storage account.

Load blobs into the Azure container

Move data to Blob storage

Blob Storage supports block, add-on and page blob objects. Virtual hard disk files used to support IaaS virtual machines are page blobs. Add blobs are used for logging, for example, when you want to write to a file and continue adding other information. Most of the files stored in Blob Storage are block blob objects.

In the container ribbon, select Download. In doing so, you have the option of uploading a folder or file.

Choose the files or folder to download. Select the type of blob. Acceptable choices are Add, Page, or Block.

If you are downloading a .vhd or .vhdx file, select Load .vhd / .vhdx files as page blobs (recommended)

In the Load in folder (optional) field, select a folder name in which to store the files or subfolders, under the container. If no folder is selected, the files are automatically loaded into
the container.

Microsoft Azure Storage Explorer – Load a blob

When you select OK, the selected files are queued for download; they are treated one by one. When the download is complete, the results appear in the Activities window.

Display blob objects from a container

In the Azure Storage Explorer app, select a container under a storage account. The main pane displays a list of blob objects hosted in the selected container.

Azure Storage Container Limit

Please be advised that there is no limit on the totality of numbers you put on the azure storage account, you are only limited by the size only, I mean the size of the storage account, which has been increased from 200tb to 500tb.

Azure Container Name Length

When developing your container, you should have a full understanding on how to name it, well, here is it, the name must be between 3 to 63 characters in its length, you can start is with a letter or number, most times, it only contains a totality of letter, numbers, and hyphen. Be advised, all letters in a container name should be inputted ion lower case.

How to copy files to Azure BLOB storage

Even when using Microsoft Azure, there comes a point when you inevitably need to access locally stored information on site.

It can be a VHD format virtual disk to use for Azure’s IaaS service, some PowerShell scripts to be run on your Azure virtual machines, or maybe just some configuration files for your Azure websites. Either way, these files must be copied to an Azure storage account for your Azure resources to access them.

The Set-AzureStorageBlobContent cmdlet

There is more than one way to transfer locally saved files to your Microsoft Azure storage account. I’m going to do this via the Set-AzureStorageBlobContent PowerShell cmdlet, using the latest ARM (Azure Resource Manager) resources.

Set-AzureStorageBlobContent is located in the Azure PowerShell module; you must therefore first download this module and make sure that it is operational. To save your files, you also need an Azure subscription and a storage account. In this example, I assume that you already have a predefined storage container.

Once these prerequisites are met, you can use the Set-AzureStorageBlobContent cmdlet to transfer your local files and automatically convert them to blob storage.

Authenticate an account

To get started, you need to authenticate your Azure subscription, using the AddAzureRmAccount cmdlet. You are prompted for a username and password, which allows you to get the token you need to change your Azure subscription.

After your Azure subscription is authenticated, you must specify a storage account for creating your Azure blob storage. When your local files are transferred to Azure, they are automatically converted to blob storage. To specify a storage account, you can use the GetAzureRmStorageAccount cmdlet. Two storage accounts are available to me below:

Get-AzureRmStorageAccount | select storageaccountname

It is now necessary to define a storage container in one of these accounts. To do this, pass the storage account object directly to the Get-AzureStorageContainer cmdlet.

storageContainer = Get AzureRmStorageAccount | where { StorageAccountName -eq 'adbdemostorageaccountGet-AzureStorageContainer

This method allows you to simply copy files to your Azure storage account. Be aware, however, that it is always a good idea to create reusable code when writing scripts with PowerShell.

The Azure storage platform automatically encrypts data before saving it to the storage container and decrypts it before use. This applies to Azure managed disks, Azure Blob, queue (Azure Queues) or table storage (Azure Table) or Azure Files. You can choose to bring your own encryption key for Azure Blob and Files. The encryption of tables and queues always uses keys managed by Microsoft. Data is encrypted using the 256-bit Advanced Encryption Standard (AES), one of the most powerful block encryption algorithms in the world.

Microsoft’s well-developed authorization procedures are a fix-and-forget feature that many IT professionals appreciate. You can grant read-only or write-only access to specific users, even for a certain period of time.

For example, if a group of auditors visits the company and needs access to certain records, the IT department can define different levels of access control for a certain period of time, without having to remember that these parameters must be changed after the listeners leave; their access will be automatically deleted.

Azure provides Azure Active Directory (Azure AD) Privileged Identity Management (PIM) for managing, controlling and monitoring access in your organization.

Data availability is of paramount importance for service providers. In other words: what is the downtime to take into account? In principle, it all comes down to the “number nine” that the cloud provider aims for in its cloud storage service level agreement (SLA).

Microsoft reports an uptime of four nine (99.99%), which means that your data may be unavailable for 50 minutes a year. In addition, Microsoft provides up to 16 9 for the durability of objects in a given year, which is the highest number of “9” on the market.

You may like the following Azure tutorials: