Consider the following options:
Option 1: Azure Storage object replication (best for simple automation) Object Replication allows automatic asynchronous replication of blobs from one container to another, even across different storage accounts.
- Define a replication policy on the source storage account.
- Set up rules specifying which blobs (e.g., backups in container x) should be replicated to container y.
- Azure automatically replicates new blobs based on the rules.
Pros:
- No compute dependency (fully managed by Azure).
- Fully automatic, requiring no scripts or functions.
- Supports cross-region replication, useful for compliance.
Cons:
- Does not support overwrites (if a blob is modified, the update is not replicated).
- Applies at the container or storage account level, so it’s not as granular as scripting.
More at https://learn.microsoft.com/en-us/azure/storage/blobs/object-replication-overview
Option 2: Event Grid + Azure Functions (best for real-time, selective copying) Azure Event Grid can trigger an Azure Function whenever a new blob is uploaded to container x, automatically copying it to container y. You can also run this on schedule.
- Event Grid monitors container x for new blob uploads.
- It triggers an Azure Function
- The function uses Azure SDK or AzCopy to copy the blob to container y.
Pros:
- Real-time automation (copies the backup immediately after creation).
- More flexible - you can filter by blob name, size, or metadata.
- Supports overwrites and modifications.
Cons:
- Requires setup of Event Grid and Azure Functions.
- More complex than Object Replication.
Option 3: Logic Apps + AzCopy (no programming needed) Azure Logic Apps can be scheduled to run AzCopy commands to move files from container x to container y on a daily or monthly basis.
- Create a Logic App with a timer trigger (e.g., run every 24 hours or monthly).
- Use AzCopy within the Logic App to move the required blobs.
Pros:
- No programming needed
- Supports overwrites and modifications.
Cons:
- Requires setup of Logic Apps.
- Slightly slower than real-time triggers like Event Grid.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin