An immutable backup is a copy that cannot be modified or deleted for a defined retention period (the WORM principle). It only protects against ransomware if the immutability cannot be lifted by the same administrators attackers are able to compromise, if retention is long enough and if restores are tested regularly. Government guidance additionally recommends keeping at least one copy offline.
Key takeaways
- Use the strictest mode for at least one copy – compliance mode, locked policy or locked vault – which even admins cannot lift.
- Manage backups with dedicated identities separate from production and with MFA, so that no single compromised account can delete all data.
- Choose a retention period longer than an attacker's realistic undetected dwell time, and keep several older versions restorable.
- Set up alerts for deletion attempts, retention changes and stopped jobs via a channel that still works if the domain is compromised.
- Use test data to verify that deletion and modification attempts fail, and measure the actual recovery time during full restores.
In short: what an immutable backup is
An immutable backup is a copy that cannot be overwritten or deleted for a defined period once it has been written. The underlying principle is WORM – write once, read many.
This guide covers how to design immutability so that it actually holds up in an incident. The basics of recovering after an attack – clean restore points, validation and restore sequencing – are covered in Backups after Ransomware.
Getting the terminology straight
Vendor material often blurs the following terms. A resilient architecture depends on keeping them apart.
| Term | Meaning | Protects against | Does not protect against |
|---|---|---|---|
| Immutability / WORM | Data cannot be changed or deleted during a retention period | Encryption and deletion of backup data | Backing up already infected systems, short retention, data theft |
| Object Lock | WORM feature in object storage such as Amazon S3; only works with versioning enabled | Overwriting and deleting individual object versions | New versions and delete markers placed "on top" of the object |
| Time-based retention | Object stays locked until a set date | Deletion before the period ends | A compromise that predates the retention window |
| Legal hold | Lock with no expiry date that stays until explicitly removed | Deletion during an ongoing investigation | Removal by authorised accounts |
| Air gap | Copy is physically or logically separated from the network | Access via the compromised network | Media and catalogue failures, long restore times |
| Offline | Copy is not connected ("cold") | Encryption of connected storage | Missing tests, stale data |
| Soft delete | Deleted data remains recoverable for a while | Accidental or quick deletion | Expiry of the window, admins switching the feature off |
The UK's National Cyber Security Centre (NCSC) reports numerous incidents in which ransomware encrypted not only the original data but also connected USB and network drives holding backups, and advises never having all backups connected at the same time.
How immutability is implemented
Object storage with Object Lock
Amazon S3 Object Lock has two retention modes. In compliance mode, a protected object version cannot be overwritten or deleted by any user, including the account's root user, and the retention period cannot be shortened. According to AWS, the only way to delete such an object early is to delete the entire AWS account.s3:BypassGovernanceRetention permission can override the lock, and the S3 console sends the required header by default.
Locked retention policies
Azure Blob Storage distinguishes between unlocked and locked time-based policies. An unlocked policy can be shortened or deleted; a locked policy cannot be deleted and can only be extended. Microsoft recommends locking policies promptly – typically within 24 hours – and using the unlocked state only for short-term testing.
Backup services with additional approval
Microsoft describes two levels: "strong protection" through out-of-band steps such as MFA or a PIN before online backups can be modified, and "strongest protection" through online immutable storage and/or fully offline or off-site backups.
Hardened on-premises repositories
Many backup products offer on-premises repositories on hardened Linux systems with an immutability flag. Here, protection does not rest with a cloud provider but with your own server: anyone who gains root access there may be able to bypass the safeguards. Minimal services, dedicated credentials and physical protection are therefore especially important.
Common mistakes that undermine immutability
1. Administrators can change retention
The most common design flaw: immutability is switched on, but in a mode that privileged accounts can lift – governance mode, an unlocked policy, an unlocked vault.
2. Same identities and credentials as production
If the backup console, cloud account and production systems share the same identity – for example domain admins who also manage backups – one compromise covers both. The NCSC calls for configurations in which it is not possible to deny all customer access, with IAM policies preventing control by a single account.
3. Time manipulation
Time-based retention relies on timestamps. With cloud services, the authoritative clock belongs to the provider. With self-managed repositories, it also depends on the system time and time synchronisation of your own server. Anyone able to tamper with the time source or system clock could potentially make retention expire early. The consequence: secure time sources, monitor for clock jumps and strictly limit access to the repository's system configuration. How exposed a specific product is should be confirmed with the vendor and tested.
4. Retention that is too short
Immutability of a few days offers little if attackers can move around undetected for longer. If the lock expires before the attack is discovered, the backups become deletable again. For Azure Backup, the "Enable for specific duration" option explicitly means that recovery points continue to exist after the immutability period but can then be deleted.
5. Only the data is protected, nothing else
Immutable backup files are of little use if the catalogue, configuration or keys are missing. The NCSC calls for robust key management with out-of-band backup of keys.
6. Misunderstanding delete markers and versions
In S3, Object Lock does not prevent new versions or delete markers from being added on top of an object; a simple DELETE request without a version ID creates a delete marker.
7. No alerting
Immutability prevents deletion, but not the attempt. The NCSC recommends alerts – enabled by default – for mass deletions, stopped backups, retention changes and changes to encryption settings.
8. An infection preserved immutably
Immutability preserves whatever was backed up – including backdoors and rogue accounts. Which restore point is clean is answered by the forensic timeline, not by the storage technology. See Backups after Ransomware.
Architecture checklist for ransomware-resistant backups
This checklist condenses recommendations from the NCSC, CISA and Microsoft as well as vendor documentation. It does not replace an individual architecture review.
Immutability
- At least one copy with WORM protection in the strictest available mode (compliance mode, locked policy, locked vault)
[5] [6] [7] - Unlocked or governance modes used only temporarily for testing
[6] - Retention period chosen deliberately and documented – longer than an attacker could realistically stay undetected
- Several older versions restorable, not just the latest
[1]
Separation and identities
- Backup administration outside the production domain; dedicated accounts that are not reused
- MFA or out-of-band approval for destructive actions
[1] [4] - No single account can lock out all access or delete all data
[1] - Root/tenant accounts of the cloud storage separately protected and monitored
Offline and locations
- At least one copy offline or not permanently connected
[2] [3] - Never all backup targets connected at the same time
[2] - Copies in more than one location or with more than one provider (depending on risk)
Keys, time and documentation
- Backup encryption keys stored outside the production environment
[1] - Time sources of self-managed repositories secured and monitored
- Restore runbook, CMDB and network diagrams protected so they survive an attack
[4]; emergency credentials available outside the production environment
Monitoring
- Alerts for deletion attempts, retention changes, stopped jobs and changes to encryption settings
[1] - An alerting channel that still works if the domain is compromised
Testing: how to tell an immutable backup actually works
An immutable backup is only trustworthy once two things have been demonstrated: it cannot be tampered with, and it can be restored. Microsoft recommends regularly exercising the business continuity and disaster recovery plan
Tamper test (with test data)
| Test case | Expected result |
|---|---|
| Delete a protected object using the backup admin account | Denied, alert raised |
| Shorten the retention period | Denied (in locked mode) |
| Disable immutability | Denied (in locked mode) |
| Stop or delete a backup job | Alert raised |
| Deletion attempt with the most privileged account (root/global admin) | Denied, or only possible via a separately protected process |
| Self-managed repository: access with production credentials | No access |
Restore test
- Restore complete systems, not just individual files, in an isolated environment
- Measure the time – the measured duration is the realistic basis for recovery objectives (see RTO and RPO)
- Test older restore points, not only the most recent one
- Actually read offline copies, including catalogue and keys
- Practise without production infrastructure: does the restore work when the domain and password vault are unavailable?
Document the results in the incident response plan. If gaps surface, that is the test doing its job – not a failure.
Immutable backups in the bigger picture
Immutable backups address availability. They do not protect against data being taken. The NCSC explicitly frames its backup principles around the effects of destructive ransomware.
For senior management, the question "Are we protected against ransomware?" therefore cannot be answered with "We have immutable backups". Three pieces of evidence are more meaningful: a locked immutability mode, separate identities for backup administration and a documented restore test with measured duration. How this fits into an overall strategy is described under Cyber Resilience.
When restore fails despite immutable backups
Even well-designed setups can fail in practice: retention has expired, keys are missing, the catalogue is destroyed or the immutable copy only holds compromised states. In that case:
- Do not reinitialise, format or repair affected repositories, NAS or RAID systems.
- Do not run data recovery software on the original disks.
- Have it assessed whether data can be reconstructed at storage level – depending on the ransomware, file system and storage system, this is sometimes partially possible. See Ransomware Data Recovery.
If an attack is still ongoing, containment and analysis come before any restore – see Ransomware Emergency.
Which route fits your situation?
Frequently asked questions
What is an immutable backup?
An immutable backup is a copy that, once written, cannot be overwritten or deleted for a defined period. Technically this is implemented with WORM (write once, read many) storage, for example Object Lock in object storage, locked retention policies or hardened backup repositories.
Is an immutable backup the same as an air gap?
No. An immutable backup remains reachable online but is protected against modification and deletion. An air gap separates a copy physically or logically from the network, for example offsite tapes or a copy that is only connected intermittently. The two complement each other because they protect against different failures and attacks.
Can an administrator still delete an immutable backup?
That depends on the mode. In less strict modes, such as Amazon S3 Object Lock governance mode or unlocked policies in Azure, privileged accounts can change retention or delete data. Only locked or compliance modes prevent this for administrators as well. That distinction is what matters in a real incident.
How long should the retention period be?
There is no universal figure. Retention should exceed the time an attack could realistically remain undetected, so that at least one clean restore point from before the compromise survives. Setting it is a trade-off between storage cost, compliance requirements and recovery objectives.
Does an immutable backup protect against data theft?
No. Immutability protects the availability of the backup, not the confidentiality of the data. If data is exfiltrated before encryption, an immutable backup helps with recovery but does not prevent publication. Access controls, encryption and exfiltration detection address that risk.
Is an immutable cloud backup enough on its own?
Usually not. Cloud backups also depend on identities, keys and accounts that can be compromised. Agencies such as CISA additionally recommend offline copies and regular testing. A sound approach combines an immutable copy, separate administration, an offline copy and documented restore tests.
How do I test whether my immutable backup is really immutable?
In a test environment or with test data, try to delete and overwrite protected objects and to shorten retention, using both a regular and a highly privileged account. Every attempt must fail and trigger an alert. Each test should also include a full restore with measured duration.
Related ransomware profiles
- Akira
.akira - Lockbit 3.0
.lockbit - BlackBasta
.basta
Read next
Sources and further reading
- [1]NCSC (UK) – Principles for ransomware-resistant cloud backups ncsc.gov.uk
- [2]NCSC (UK) – Offline backups in an online world ncsc.gov.uk
- [3]CISA – #StopRansomware Guide cisa.gov
- [4]Microsoft Learn – Prepare for ransomware attacks with a backup and recovery plan learn.microsoft.com
- [5]AWS Documentation – Locking objects with Amazon S3 Object Lock docs.aws.amazon.com
- [6]Microsoft Learn – Immutable storage for Azure Blob Storage (Overview) learn.microsoft.com
- [7]Microsoft Learn – Concept of Immutable Vault for Azure Backup learn.microsoft.com