Blob Storage: Configuring Immutable Backups with TrueNas and Azure — Managing Time-Based Retention

AnthonyLiwen-4936 20 Reputation points
2026-10-20T13:36:56.48+00:00

I am attempting to configure Azure Blob Storage as the destination for SQL backup files written by TrueNAS Cloud Sync, with the goal of keeping these backups undeletable for 60 days. I tried using a time-based retention and that works for incremental SQL backups, but I'm facing issues where the copy process fails when copying full SQL backups. It fails because of the immutable time-based retention policy on the blobs

Azure Blob Storage
Azure Blob Storage

An Azure service that stores unstructured data in the cloud as blobs.


1 answer

Sort by: Most helpful
  1. Hemant Bharadwaj 0 Reputation points Microsoft Employee
    2026-10-20T21:24:29.6233333+00:00

    This behavior is consistent with TrueNAS attempting to replace, rename or delete a blob that is already protected by the time-based immutability policy.

    Once the policy applies, Azure Blob Storage must reject operations that modify or delete protected content. A full backup commonly reuses the same destination filename, while incremental backups often create new files; that difference would explain why one workflow succeeds and the other fails.

    Recommended approach:

    1. Configure the SQL backup process to produce a unique, timestamped name for every full backup.
    2. Ensure TrueNAS uploads only completed backup files rather than files still being written.
    3. Configure Cloud Sync so it creates a new blob and does not overwrite, rename or delete the previous destination blob.
    4. Check the TrueNAS log for the exact Azure response, especially HTTP 409 or errors such as BlobImmutableDueToPolicy.
    5. Test both backup and restore before locking the policy.

    If the workflow must reuse a logical filename, evaluate version-level immutability with blob versioning. A new version may be created while older protected versions remain immutable, but this works only if the operations issued by TrueNAS are supported under the selected policy. It will not make an overwrite/delete-style synchronization operation automatically compatible.

    Another design is to upload to a staging container and copy each completed file—under a unique name—to the immutable destination. Note that the staging period is not WORM-protected, so this is appropriate only if that gap meets the recovery and compliance requirements.

    Also remember that a locked retention policy cannot be shortened or removed. Test with an unlocked policy and representative full-backup files first.

    References:

    Was this answer helpful?


Your answer

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