Fix: How to move blob from one storage account to another using logic app

 To move a Blob from one Azure Storage account to another using Azure Logic App, you can use the built-in Azure Blob Storage connectors. Here's a step-by-step guide:


**Prerequisites:**

1. Azure Logic App: Create an Azure Logic App if you haven't already.

2. Azure Storage Accounts: Have the source and destination Azure Storage accounts set up and accessible.


**Step 1: Create a Logic App**


1. In the Azure Portal, go to your Logic App's resource group and create a new Logic App if you don't have one already.


**Step 2: Create a Trigger**


1. In your Logic App designer, select a trigger to start your workflow. For this example, you can use the "When a blob is added or modified (properties only)" trigger from the Azure Blob Storage connector. This trigger will start your workflow when a new blob is added or modified in the source storage account.


**Step 3: Add an Action for Copying the Blob**


1. After the trigger, add a new action by clicking the "+" sign below the trigger.


2. Search for "Azure Blob Storage" in the search box, and select "Azure Blob Storage" from the list of connectors.


3. Choose the "Copy blob" action. This action will copy the blob from the source storage account to the destination storage account.


4. Sign in with your Azure account and select the source storage account and container.


5. In the Destination section, choose the destination storage account, container, and specify the name of the destination blob. You can use dynamic content to select the blob name from the trigger.


**Step 4: Handle Errors**


1. It's a good practice to handle errors in your workflow. Add a condition or other actions to handle potential errors that may occur during the copying process.


**Step 5: Save and Test**


1. Save your Logic App and test it by adding or modifying a blob in the source storage account. Verify that the blob is copied to the destination storage account.


**Step 6: Monitoring and Scheduling**


1. You can set up monitoring, scheduling, or other triggers as needed to automate the copying process. For example, you can trigger the workflow at specific intervals or based on specific conditions.


This Logic App will automatically copy blobs from one storage account to another whenever new blobs are added or modified in the source account.


Please note that additional settings, such as authentication and security, may be required based on your specific use case and security requirements. Ensure that your Logic App and storage accounts are appropriately secured and configured to meet your organization's needs.

Comments

Popular posts from this blog

bad character U+002D '-' in my helm template

GitLab pipeline stopped working with invalid yaml error

How do I add a printer in OpenSUSE which is being shared by a CUPS print server?