From Batch task created from portal, how can we redirect the output file to storage account?

vipullag-MSFT 26,396 Reputation points
2020-05-07T06:52:37.207+00:00

From Batch task created from portal, how can we redirect the output file to storage account?

[Note: As we migrate from MSDN, this question has been posted by an Azure Cloud Engineer as a frequently asked question]
Source: MSDN Thread Link

Azure Batch
Azure Batch
An Azure service that provides cloud-scale job scheduling and compute management.
339 questions
0 comments No comments
{count} votes

Accepted answer
  1. KarishmaTiwari-MSFT 20,212 Reputation points Microsoft Employee
    2020-05-07T21:12:04.303+00:00

    Output files of batch task to storage account cannot be done from the portal directly.
    You can achieve them in many ways like explained below.

    1. One way is using API:
      You can achieve this when you create a task via API where you can add configuration for saving files to the storage account while creating the task itself.
      You can refer this document (https://learn.microsoft.com/en-us/azure/batch/batch-task-output) for more details.
      1. Another way is using Custom Script:
        Using custom script you can run them along with the task executable to store the files in storage account. You can refer this here(https://learn.microsoft.com/en-us/azure/batch/batch-task-output#implement-a-custom-file-movement-solution)
      2. Another Alternative is by Startup task:
        You can add a startup task for a node which can mount storage account to a node in a particular directory, then in your task executable you can move the output files to that mounted directory.

    Source : MSDN Thread Link

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.