赞
踩
azure blob
There are several options to upload SQL Server backups files, scripts or other files to Azure. In this new article, we will show how to use a new tool, Microsoft Azure Storage Explorer (MASE).
有几个选项可以将SQL Server备份文件,脚本或其他文件上载到Azure。 在这篇新文章中,我们将展示如何使用新工具Microsoft Azure Storage Explorer(MASE)。
MASE is a tool to create NoSQL tables, Blob storage (Binary Large Objects), File storage, Queue Storage.
MASE是创建NoSQL表,Blob存储(二进制大对象),文件存储,队列存储的工具。
In a previous chapter, we showed how to use the command line to upload local files to Blob Storage. The command line is a good option to automate administrative tasks. If you want to administer the Tables, Blob storage, etc. manually, the easiest option is the MASE.
在上一章中 ,我们展示了如何使用命令行将本地文件上传到Blob存储。 命令行是自动执行管理任务的不错选择。 如果要手动管理表,Blob存储等,最简单的选项是MASE。
This article will teach you the following:
本文将教您以下内容:
How to create a storage Account in the Portal
如何在门户中创建存储帐户
How to install MASE
如何安装MASE
How to upload files to Azure Blob Containers using MASE
如何使用MASE将文件上传到Azure Blob容器
How to upload files to Azure File Storage using MASE
如何使用MASE将文件上传到Azure文件存储
How to create Queue messages using MASE
如何使用MASE创建队列消息
How to create tables using MASE
如何使用MASE创建表
An Azure Account
Azure帐户
A Windows machine (it could be possible to use Macintosh or a Linux machine)
Windows计算机(可以使用Macintosh或Linux计算机)
The first step is to create an Azure Storage Account. In the Azure Storage, you will be able to store Blobs, Files, Messages and Tables.
第一步是创建一个Azure存储帐户。 在Azure存储中,您将能够存储Blob,文件,消息和表。
In the Azure Portal, go to New > Data +Storage > Storage Account:
在Azure门户中 ,转到新建>数据+存储>存储帐户:
Specify a name for the storage account. There are 2 deployment models:
指定存储帐户的名称。 有两种部署模型:
Resource Manager, which is the new and recommended option. This option allows you to group resources.
资源管理器,这是新的推荐选项。 此选项使您可以对资源进行分组。
Classic is the legacy option, it is complex to administer because resources are created individually and cannot be grouped as the Resource Manager.
经典是旧选项,由于资源是单独创建的并且不能分组为“资源管理器”,因此管理起来很复杂。
We also have the Account kind, which can be general purpose or Blob storage accounts. General purpose can be used for Queues, Blob, File Storage and Tables. Blob Storage is for blob storage only and you can specify the frequency of the use of the data. Hot is data frequently accessed and cool is less frequent and long lived. The Hot category is more expensive.
我们也有Account类型 ,可以是通用帐户或Blob存储帐户。 通用可用于队列,Blob,文件存储和表。 Blob存储仅用于Blob存储,您可以指定数据的使用频率。 热点是指经常访问的数据,热点是指访问频率较低且寿命较长的数据。 热类别更昂贵。
The Category has 2 options:
类别有2个选项:
Standard, is the basic one and the cheapest option.
标准,是最基本的也是最便宜的选择。
Premium, which offers a high performance and low latency service.
Premium,可提供高性能和低延迟的服务。
In replication, we have 4 offers with different prices:
复制时,我们提供4个价格不同的优惠:
Zone-Redundant Storage (ZRS) replicates data in 2 to 3 facilities in the same region or in 2 regions.
区域冗余存储(ZRS)在同一区域或2个区域中的2到3个设施中复制数据。
Locally-Redundant Storage (LRS) is the cheapest option it replicates data in the same region that was created.
本地冗余存储(LRS)是最便宜的选择,它可以在创建的同一区域中复制数据。
Geo-Redundant Storage (GRS) replicates the data in a secondary region hundreds of miles away.
地理冗余存储(GRS)在数百英里之外的辅助区域中复制数据。
Read-Access Geo-Redundant Storage (RA-GRS) is similar to GRS, but it also provides read access in secondary copies maximizing the availability.
读取访问地理冗余存储(RA-GRS)与GRS类似,但是它还提供了辅助副本中的读取访问权限,从而最大限度地提高了可用性。
The subscription contains the information used to subscribe to Azure Services. You can create groups to administer different Azure Services. Finally, the location is the place where the Storage Account will be placed. Use a place close to your customers.
订阅包含用于订阅Azure服务的信息。 您可以创建组来管理不同的Azure服务。 最后,该位置是将放置存储帐户的位置。 请在靠近客户的地方使用。
You can download the installer for Windows here:
您可以在此处下载Windows的安装程序:
There are also installers for Linux and Mac. In this article, we will use Windows.
也有Linux和Mac的安装程序。 在本文中,我们将使用Windows。
You will receive an Agreement:
您将收到一个协议:
Installing MASE is very easy (the famous next, next process). Once installed, you can launch the program:
安装MASE非常容易(著名的下一步,下一步)。 安装后,您可以启动该程序:
MASE will ask you to connect to Azure. Press connect:
MASE将要求您连接到Azure。 按连接:
Sign in using your Azure credentials:
使用您的Azure凭据登录:
Press Azure Account Settings Icon, check your subscription and press Apply:
按“ Azure帐户设置”图标,检查您的订阅,然后按“应用”:
Now we are ready to work!
现在我们可以开始工作了!
Let’s start with Blob Containers.
让我们从Blob容器开始。
“Azurestoragecreated” is the Storage Account that we created in the Azure Portal. We can create Blob Objects, Files, Queues and Tables. The Blob Containers store Binary Large Objects like videos, documents, SQL Backups, pictures in Azure.
“ Azurestoragecreated”是我们在Azure门户中创建的存储帐户。 我们可以创建Blob对象,文件,队列和表。 Blob容器在Azure中存储二进制大对象,例如视频,文档,SQL备份,图片。
The Blob storage prices are very competitive. For example, you can store 4000 TB per month of Data per 0.01 USD in Central USA using a Locally-Redundant Storage. However, you are charged 0.01 USD per data retrieval per GB, data write and 0.1 USD per GB and there are other charges to block, put Blobs.
Blob存储价格非常具有竞争力。 例如,您可以使用本地冗余存储在美国中部每月每4000 USD每月存储4000 TB数据。 但是,您需要为每GB数据检索,数据写入和每GB 0.1 USD收取0.01 USD,并且还有其他费用要阻止,即放入Blob。
To create a new Blob Container, right click Blob Containers and select Create Blob Container:
要创建新的Blob容器,请右键单击Blob容器,然后选择创建Blob容器:
Specify a name for the Blob Container:
指定Blob容器的名称:
Uploading files or folders with MASE is like an attachment in an email. Just click the Upload icon:
使用MASE上传文件或文件夹就像电子邮件中的附件一样。 只需点击上传图标:
You can select one or multiples files at the same time:
您可以同时选择一个或多个文件:
Once the files are selected, you can press the Upload button:
选择文件后,您可以按上载按钮:
Once uploaded, you can open the files, copy the URL, delete or download them:
上传后,您可以打开文件,复制URL,删除或下载文件:
File Storage in Azure is used to share files between applications using SMB (Server Message Block) 3.0 Protocol.
Azure中的文件存储用于使用SMB(服务器消息块)3.0协议在应用程序之间共享文件。
The price is 0.08 USD per GB per storage in Locally-Redundant Storage and there are other charges per list operations, put and create containers.
本地冗余存储的价格为每GB每个存储0.08 USD,并且每个列表操作,放置和创建容器的其他费用。
To add files to File Shares, right click on File Shares and select Create File Shares:
要将文件添加到文件共享,请右键单击文件共享,然后选择创建文件共享:
In the File share, you can create directories with the New Directory icon:
在文件共享中,可以使用“新建目录”图标创建目录:
We will create a directory to store SQL Server Backups:
我们将创建一个目录来存储SQL Server备份:
The upload process is the same than in Blob containers. You need to click the Upload Icon:
上传过程与Blob容器中的上传过程相同。 您需要点击上传图标:
You can upload any file. In this example, a SQL Server file was uploaded:
您可以上传任何文件。 在此示例中,上传了一个SQL Server文件:
To handle messages in your Apps, you can use Queue Storage included in the Storage Account. However, Azure is now offering a new service for Queues called Service Bus messaging, which allow communication between multiple protocols. The use of Service Bus messaging is out of the scope of this article, but you can read about it in the following link: Service Bus messaging: flexible data delivery in the cloud
要处理您Apps中的消息,您可以使用存储帐户中包含的队列存储。 但是,Azure现在为队列提供了一项称为服务总线消息传递的新服务,该服务允许多个协议之间进行通信。 服务总线消息传递的使用不在本文的讨论范围之内,但是您可以在以下链接中阅读它: 服务总线消息传递:在云中灵活地传递数据
The price for Queue Messages is 0.07 USD per GB for 1 TB and 0.048 USD per GB for 1000 to 5000 TB and 0.0036 USD per 100,000 transactions for queues.
队列消息的价格为1 TB每GB 0.07 USD,1000到5000 TB每GB 0.048 USD,队列每100,000个事务0.0036 USD。
To create queues, right click on Create Queue:
要创建队列,请右键单击“创建队列”:
Press Add to create a new message:
按添加以创建新消息:
Add a text and define the number of days when the message will expire:
添加文本并定义消息过期的天数:
The message includes an ID, the message, the date of the insertion and the expiration date:
消息包括ID,消息,插入日期和到期日期:
Azure Tables are an interesting NoSQL alternative to store data in your application. It is used for non-structured or semi-structured data. Use Tables when you need big non-relational tables. The prices per storage are the same than the Queue Storage. It is a very cheap alternative to store data.
Azure表是将数据存储在应用程序中的一种有趣的NoSQL替代方法。 它用于非结构化或半结构化数据。 当您需要大型非关系表时,请使用表。 每个存储的价格与队列存储的价格相同。 这是存储数据的非常便宜的选择。
Storing several TB of data per low cost is a tentative option for applications.
对于应用程序而言,以低成本存储数TB的数据是一种尝试性选择。
Right click on Tables and select Create Table:
右键单击表,然后选择创建表:
Our table will be named sqlshacktable:
我们的表将被命名为sqlshacktable:
Press the Add icon to add properties and new rows:
按添加图标以添加属性和新行:
The add property allows you to add new properties (like columns). RowKey is the identifier inside a partition. PartitionKey is used to assign data to a specified partition. PartitionKey is essential for scalability for Big Data. Press the Add Property to add new properties:
add属性允许您添加新属性(如列)。 RowKey是分区内的标识符。 PartitionKey用于将数据分配给指定的分区。 对于大数据的可伸缩性,PartitionKey是必不可少的。 按添加属性以添加新属性:
Add a Name, Last name, Email or any property of your preference and specifies values. Once created, press Insert to insert more data:
添加名称,姓氏,电子邮件或您的首选项任何属性并指定值。 创建完成后,按插入以插入更多数据:
Add a second row and press insert:
添加第二行,然后按插入:
As you can see, creating tables is a straightforward process:
如您所见,创建表是一个简单的过程:
The Azure Storage Account is a simple tool that can be used in Windows, Linux and Mac to create Blob Containers, File Storage, Queue Messages and Azure Tables.
Azure存储帐户是一个简单的工具,可以在Windows,Linux和Mac中使用它来创建Blob容器,文件存储,队列消息和Azure表。
翻译自: https://www.sqlshack.com/working-table-blob-queues-file-storage-azure/
azure blob
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。