Azure automation runbooks(multiple) are not appending to same blob storage

Azure-learning 56 Reputation points

Azure automation runbooks are not appending to same blob storage.
I have 5 runbooks from where I am sending log data to a common storage account blob file. as below

Set-AzStorageBlobContent -Container "data" -File "file" -Blob "$Year/$Month/$Day/status.csv" -Context $context -Force

but it is removing the content of other runbooks , it's not appending when running the powershell scripts using automation runbooks. it's just deleting previously written content from other
runbooks .
if I am trying the same powershell scripts from local (vscode), it's working fine . all the scripts are appending to same storage account. but when i am running using runbooks it's not appending.

please suggest

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,845 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,564 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,166 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,436 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Azure-learning 56 Reputation points

    i have added append -Blobtype append also but it's not saving other jobs status that was written previously before the current run

    0 comments No comments

  2. Carlos Villagomez 1,106 Reputation points Microsoft Employee

    Hello @NGaur-3476,

    Thanks for your post! I have been doing some further investigation with our Automation Team and confirmed that when you have different process running, then you should output them to separate files and then append later. From what we understand for this scenario, it appears that this is a basic OS synchronization issue that occurs when different processes all try to write to the same file and thus causing a conflict that you are seeing.

    Please let us know if you are able to perform these changes and we are happy to help you further should you have any questions or concerns.

    Carlos V.