Ransomware-Proof Backups for UK Businesses: 3-2-1 and NCSC
Apply the 3-2-1 backup rule the NCSC way, know when encrypted personal data is a UK GDPR breach, and test a restore with checksums before an attack.
By Redbison Dev · · 10 min read

United Kingdom edition. Written for UK organisations: the NCSC's ransomware mitigation and ransomware-resistant backup principles, the UK GDPR definition of a personal data breach and its 72-hour clock, and the Home Office ransomware payment proposals. US edition
The 3-2-1 rule (three copies of your data, on two kinds of storage, one of them off-site) is still the right starting point for a UK business. Ransomware adds a condition the NCSC states plainly: keep offline backups, separate from your network and systems, because ransomware actively targets backups to make payment more likely. And if those encrypted files hold personal data, the attack can also start a 72-hour reporting clock under UK GDPR.
This edition sets out what the NCSC asks for, how an attack on your backups interacts with UK GDPR, where the Home Office's ransomware payment proposals stand, and a worked example that sets up and tests backups for a UK online shop's database with the Database Backup Script Generator and the Hash File Verifier. It is general guidance; during a live attack, get specialist incident response help before touching the backups.
What the NCSC asks for
The NCSC's guidance on mitigating malware and ransomware attacks makes backups the first action, calling up-to-date backups "the most effective way of recovering from a ransomware attack". Its points map neatly onto 3-2-1:
| NCSC advice | Where it lands in 3-2-1 |
|---|---|
| Make regular backups of your most important files, know how to restore them, and regularly test that it works | The 3 copies, and the restore test below |
| Create offline backups kept separate, in a different location (ideally off-site), from your network and systems, or in a cloud service designed for this purpose | The 1 off-site copy, which must also be out of reach |
| Make sure a cloud service protects previous versions from being immediately deleted, because sync can replace good files with encrypted copies | Versioning or immutability on the off-site copy |
| Connect backups only to known clean devices before recovery, and scan backups for malware before restoring, since ransomware may have been in the network for some time | The restore drill |
| Patch backup products | Keeping the backup system itself out of the attack |
The NCSC's principles for ransomware-resistant cloud backups go further for the off-site copy. Backups should resist destructive actions, so that deleted data is still recoverable for a period; destructive requests should need a second, separate system to be compromised; customers should be able to reach their backups through an agreed out-of-band route even if all corporate IT is down; a customer should be able to restore an older version even if later versions are corrupted; and alerts should fire on significant changes or privileged actions.
The NCSC also says law enforcement does not encourage, endorse or condone paying ransoms, and that paying gives no guarantee you will get your data back. Good backups are what make that position affordable.
When encrypted backups become a UK GDPR breach
UK GDPR Article 4(12) defines a personal data breach as a breach of security leading to the accidental or unlawful destruction, loss, alteration, unauthorised disclosure of, or access to, personal data. Ransomware that encrypts customer records is a breach of security that alters personal data and can make it unavailable, so it can fall within that definition even when nothing is stolen, and many attacks also copy data out before encrypting it.
That matters because Article 33 then gives the controller 72 hours from becoming aware to notify the regulator (the Information Commission, under the text in force since 30 September 2026), unless the breach is unlikely to result in a risk to people's rights and freedoms, and requires every breach to be documented. Backups change the risk assessment: a business that can restore yesterday's data quickly, from a copy the attacker never touched, is in a very different position from one that has lost the data. So the restore test below is also evidence for your breach assessment.
The Home Office proposals on ransom payments
In January 2025 the Home Office consulted on three proposals: a targeted ban on ransomware payments for the public sector and for owners and operators of regulated critical national infrastructure; a payment prevention regime for everyone else; and mandatory reporting of ransomware incidents. Its response, published on 22 July 2025, reported 72% of respondents agreeing with the targeted ban and an economy-wide mandatory reporting requirement having the most support among the reporting options, and said that if progressed these would be the first specific measures in UK law to counter ransomware.
At the time of that response these were proposals, not law. Check GOV.UK for whether legislation has since been introduced, especially if you are a public body or part of critical national infrastructure. Either way, the practical answer is the same: backups that make paying unnecessary.
Worked example: 3-2-1 for a UK shop's order database
A small UK online retailer runs a PostgreSQL database called orders on one server.
Step 1: generate a backup script that fails loudly. In the Database Backup Script Generator, choose PostgreSQL (port 5432), host localhost, username backup_user, database orders, keep structure and data ticked, tick Compressed custom format (pg_restore) and click Generate Scripts. The backup script runs pg_dump --format=custom, writes files like /backup/postgresql/orders_20261109_020000.dump, exits with the error code if the dump fails, and sets the file to chmod 600. Download it as orders_backup.sh.
Step 2: checksum every dump. After the script's listing line, add sha256sum for the new file and keep the .sha256 line in a place the server cannot rewrite, such as a locked object version in the off-site account.
Step 3: the three copies.
| Copy | Where | What protects it |
|---|---|---|
| 1 | Live database on the server | Nothing against ransomware; this is what gets encrypted |
| 2 | Nightly dump on a NAS or second machine | A different system, but still on the office network |
| 3 | Off-site, offline or in locked cloud storage | Out of reach of the server's credentials; versions kept for a set period, as the NCSC principles describe |
Step 4: a restore script for a test database. Change the database name to orders_restore_test and generate again. The restore script restores with pg_restore --clean --if-exists --no-owner --exit-on-error into orders_restore_test, never into the live orders. Download it as orders_restore_test_restore.sh.
Step 5: prove a checksum catches a change. Open the Hash File Verifier, select the downloaded orders_restore_test_restore.sh and paste:
9c7d3b000940699da0f10829abaf45b1be6787d2e902e935a11b325dd5b374b0 orders_restore_test_restore.sh
With Algorithm on auto-detect, it recognises a SHA-256 sha256sum line and shows Hash Verification Passed for the 896-byte script. Change DB_PORT='5432' to DB_PORT='5433' and verify again: the hash becomes bfdb95ee07dbb8de392b1d0417490dd691061d4459146aaf6d4bdb25c70ef4f5 and the check fails. Real dumps work the same way.
The restore drill, NCSC-style
Once a month, or whatever matches how much data you can afford to lose:
- Restore from copy 3, the off-site one you would rely on after an attack, onto a machine you know is clean and that is not on the production network.
- Verify the checksum against the line stored away from the backup server, and scan the restored files for malware, as the NCSC advises.
- Restore into the test database with the generated script and compare row counts on the main tables.
- Record the time taken and the age of the copy. The first is your real recovery time, the second your real data loss. Both feed the UK GDPR risk assessment if an attack ever happens.
- Write down what went wrong, and fix it before the next drill. The NCSC suggests revising your incident plan with lessons learnt after any incident; a failed drill is a cheap incident.
For reporting a live attack, the NCSC's website has a "Report an incident" route, and personal data breaches go to the Information Commission under Article 33.
Tools for this job
- Database Backup Script Generator: backup and restore scripts for PostgreSQL, MySQL, SQLite, SQL Server and Oracle that stop on errors.
- Hash File Verifier: check a dump or script against its
sha256sumline in the browser.
For dump options and the mistakes that break restores, read database backups with pg_dump, mysqldump and friends. For the breach clock in a UK post-incident review, see post-incident reviews in the UK.
Frequently asked questions
Does the NCSC recommend the 3-2-1 rule?
The NCSC's ransomware guidance does not use the name, but it asks for the same things and more: regular backups, at least one offline and separate from your network (ideally off-site), versions that cannot be deleted immediately, and regular restore tests.
Is a ransomware attack a personal data breach?
It can be. UK GDPR Article 4(12) covers the destruction, loss or alteration of personal data as well as its disclosure, so encrypting customer records can qualify even if nothing is stolen. Whether it must be reported within 72 hours depends on the risk to individuals, which good backups can reduce.
Is it illegal to pay a ransom in the UK?
The Home Office has consulted on banning payments by the public sector and regulated critical national infrastructure; its July 2025 response described these as proposals. The NCSC says law enforcement does not encourage, endorse or condone paying, and paying does not guarantee you get your data back. Take legal advice before any payment decision.
Is OneDrive or Google Drive a backup?
Not on its own. The NCSC warns that cloud services often sync immediately after files are replaced with encrypted copies. It only works as a backup if the service keeps earlier versions that cannot be deleted at once and you can restore from them.
Sources and further reading
- Mitigating malware and ransomware attacks, National Cyber Security Centre. Regular and offline backups, restore testing, clean devices, scanning backups, the position on paying.
- Principles for ransomware-resistant cloud backups, National Cyber Security Centre. Resilience to destructive actions, out-of-band access, older versions, alerts.
- UK GDPR Article 4: definitions, legislation.gov.uk. Article 4(12), personal data breach.
- UK GDPR Article 33, legislation.gov.uk. 72-hour notification and documenting breaches.
- Ransomware: proposals to increase incident reporting and reduce payments to criminals, Home Office. Consultation (January 2025) and government response (22 July 2025).
- Security Guidelines for Storage Infrastructure, SP 800-209, NIST. Isolated recovery copies and periodic test restores.