[Build and Deploy Staging Site] Publish from microsoft/azuretipsandtricks-private:main/src/blog
This commit is contained in:
Родитель
5e14b8adee
Коммит
5d8d356092
|
@ -0,0 +1,64 @@
|
|||
---
|
||||
type: post
|
||||
title: "Tip 367 - How to move Azure Storage Blobs between containers"
|
||||
excerpt: "Learn how to move Azure Storage Blobs between containers"
|
||||
tags: [Storage]
|
||||
share: true
|
||||
date: 2022-05-17 12:00:00
|
||||
---
|
||||
|
||||
::: tip
|
||||
|
||||
:fire: Make sure you [star the repo](https://github.com/microsoft/azuretipsandtricks) to keep up to date with new tips and tricks.
|
||||
|
||||
:bulb: Learn more : [Azure Storage account overview](https://docs.microsoft.com/azure/storage/common/storage-account-overview?WT.mc_id=docs-azuredevtips-azureappsdev).
|
||||
|
||||
:tv: Watch the video : [How to move Azure Storage Blobs between containers](https://youtu.be/S3TXW4UrSak?WT.mc_id=youtube-azuredevtips-azureappsdev).
|
||||
|
||||
:::
|
||||
|
||||
### How to move Azure Storage Blobs between containers
|
||||
|
||||
#### Easy file management
|
||||
[Azure Storage](https://docs.microsoft.com/azure/storage/common/storage-account-overview?WT.mc_id=docs-azuredevtips-azureappsdev) is a versatile and secure storage service. You can create storage containers with folder hierarchies and store [Blobs](https://docs.microsoft.com/azure/storage/blobs/storage-blobs-introduction?WT.mc_id=docs-azuredevtips-azureappsdev) in them. But it isn't very straightforward to move Blobs between containers or between storage accounts. Azure offers several options to help with this, including [Azure Storage Explorer](https://azure.microsoft.com/features/storage-explorer/?WT.mc_id=azure-azuredevtips-azureappsdev).
|
||||
|
||||
In this post, we'll use [Azure Storage Explorer](https://azure.microsoft.com/features/storage-explorer/?WT.mc_id=azure-azuredevtips-azureappsdev) to move [Blobs](https://docs.microsoft.com/azure/storage/blobs/storage-blobs-introduction?WT.mc_id=docs-azuredevtips-azureappsdev) between containers in [Azure Storage Accounts](https://docs.microsoft.com/azure/storage/common/storage-account-overview?WT.mc_id=docs-azuredevtips-azureappsdev).
|
||||
|
||||
#### Prerequisites
|
||||
If you want to follow along, you'll need the following:
|
||||
* An Azure subscription (If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=azure-azuredevtips-azureappsdev) before you begin)
|
||||
* Two existing [Azure Storage accounts](https://docs.microsoft.com/azure/storage/common/storage-account-overview?WT.mc_id=docs-azuredevtips-azureappsdev) with Blobs in one of them. Learn how to work with Blobs [here](https://docs.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-portal?WT.mc_id=docs-azuredevtips-azureappsdev)
|
||||
|
||||
#### Copy Blobs with Azure Storage Explorer
|
||||
I have two Azure Storage accounts. In one of them, I have a container that contains several Blobs. Let's move those Blobs to the other Storage account.
|
||||
|
||||
1. Go to the [Azure portal](https://portal.azure.com/?WT.mc_id=azure-azuredevtips-azureappsdev)
|
||||
2. Open the Storage Account that contains the Blobs
|
||||
3. Navigate to the **Data migration** menu
|
||||
4. Click on the **"Browse data migration tools"** button. This will show all the options to migrate or move data in Azure Storage. There are many options, including the Azure CLI, Azure Data Factory, AzCopy and the Azure Storage Explorer. This last one is a GUI-based application that enables you to manage data in Azure Storage
|
||||
|
||||
<img :src="$withBase('/files/151migrationmenu.png')">
|
||||
|
||||
(Azure Storage data migration options)
|
||||
|
||||
5. We'll use the Azure Storage Explorer to manage Blobs. Go to [http://aka.ms/storageexplorer](http://aka.ms/storageexplorer?WT.mc_id=other-azuredevtips-azureappsdev) and click **Download now**
|
||||
6. Use the downloaded file to install the **Azure Storage Explorer** on your machine and open it
|
||||
7. When prompted, **sign into** your Azure account
|
||||
8. Now you can see your Storage accounts and navigate through them. You can add and delete containers and Blobs. Navigate to the container that contains the Blobs, right-click on it and click **"Copy Blob Container"**
|
||||
|
||||
<img :src="$withBase('/files/151copyblobcontainer.png')">
|
||||
|
||||
(Copy Blob Container in the Azure Storage Explorer)
|
||||
|
||||
9. Navigate to the other Azure Storage account, right-click the **Blob Containers** node and click **"Paste Blob Container"**. This copies the entire container, including Blobs and properties, to the Storage account
|
||||
10. **Click on the original container**. This will reveal the Blobs in it
|
||||
11. **Select all the Blobs** and click on the **Delete** button in the top menu. This is needed to move the Blobs, as there is no cut and paste functionality
|
||||
|
||||
Alternatively, you can also copy the Blobs that you need and paste them in any container, including in containers of other Storage accounts.
|
||||
|
||||
<img :src="$withBase('/files/151pasteblobs.png')">
|
||||
|
||||
(Paste Blobs to a container in the Azure Storage Explorer)
|
||||
|
||||
#### Conclusion
|
||||
The [Azure Storage Explorer](https://azure.microsoft.com/features/storage-explorer/?WT.mc_id=azure-azuredevtips-azureappsdev) is a GUI-based tool that enables you to easily manage your data in [Azure Storage](https://docs.microsoft.com/azure/storage/common/storage-account-overview?WT.mc_id=docs-azuredevtips-azureappsdev). Go and check it out!
|
Загрузка…
Ссылка в новой задаче