Hello Oleg Yurchenko,
Greetings! Welcome to Microsoft Q&A Platform.
If a container in azure blob storage deleted automatically after creating that suggests a misconfiguration or an automated issue. Here are some steps to solve the issue.
To undelete and view the folder that was automatically deleted in your Azure Blob Storage please check the following methods,
- Check life cycle management policy:
- Navigate to the azure portal >storage accounts > containers.
- Select the container or check under Lifecycle Management.
- Ensure that there are no lifecycle management policies set to delete blobs immediately after creation. 2.Enable soft delete:
- Make sure that soft delete is enable so that you can recover if they are deleted.
- Navigate to the azure portal > storage accounts > data protection
- under settings enable soft deletion. 3.Check the access policies and permissions associated with the container keys
- Enable Azure Monitor and Azure Activity Logs to track and audit operations on your storage account.
- Set up alerts to notify you about creation or deletion events. This can help you identify when and why the container is being deleted. 4.To restore a soft-deleted blob, you can use the Azure portal.
- Navigate to containers > Go to show delete blob settings to view soft delete blobs then select the delete blob and select undelete.
To prevent the deletion of blobs in your Azure Storage account, you can use several features and configurations as Azure Storage provides data protection for Blob Storage and Azure Data Lake Storage Gen2 to help you to prepare for scenarios where you need to recover data that has been deleted or overwritten.
If you're looking for basic data protection coverage for your storage account and the data that it contains, then Microsoft recommends taking the following steps to begin with:
- Configure an Azure Resource Manager lock on the storage account to protect the account from deletion or configuration changes. Learn more...
- Enable container soft delete for the storage account to recover a deleted container and its contents. Learn more...
- Save the state of a blob at regular intervals:
- For Blob Storage workloads, enable blob versioning to automatically save the state of your data each time a blob is overwritten. Learn more...
- For Azure Data Lake Storage workloads, take manual snapshots to save the state of your data at a particular point in time. Learn more...
These options, as well as other data protection options for other scenarios, are described in more detail in the following doc - https://video2.skills-academy.com/en-us/azure/storage/blobs/data-protection-overview.
Hope this answer helps! Please let us know if you have any further queries. I’m happy to assist you further.
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.