To protect your backups from ransomware, make sure at least one copy is out of the malware's reach: a drive you disconnect after each backup, or storage the infected PC cannot write to. Keep versioned backups going back weeks or months, so you can restore files from before the infection, encrypt the backups, use a separate account for backup storage, and turn on Windows' Controlled folder access. A backup that sits on a permanently mapped drive is just one more folder for ransomware to encrypt.
This guide explains how ransomware reaches backups and the practical steps to stop it on a home or small office PC.
How ransomware gets to your backups
Ransomware encrypts every file it can write to, using the permissions of the account it runs under. That includes:
- External drives that are always plugged in. To ransomware, drive E: is just another drive.
- Mapped network drives and NAS shares that your account can write to.
- Sync folders, such as OneDrive or Dropbox. Encrypted files sync up and replace the good copies.
- Windows' own restore points and shadow copies, which many ransomware strains delete as their first step.
- Backups that only keep the latest copy. If tonight's backup copies the encrypted files over yesterday's good ones, the backup is gone too.
Some attacks also sit quietly for days before encrypting, so a backup history that only goes back a week may not be enough.
Step 1: keep one copy disconnected
The most reliable protection is an air gap: a backup that is physically disconnected when not in use.
- Use an external USB drive for at least one backup.
- Plug it in, let the backup run, and unplug it when it finishes.
- For the best protection, use two drives and rotate them weekly, keeping one away from the PC, such as at work or with a family member.
The obvious weakness is that people forget to plug the drive in. A backup that starts automatically when you connect the drive removes most of that friction; see how to back up automatically when a USB drive is plugged in.
Step 2: keep versions, and keep them long enough
Versioned backups keep several dated copies of each file, so a file encrypted on Tuesday can be restored as it was on Monday. Check two things:
- Versions are kept, not overwritten. Plain copy tools and sync mirror the current state. Use a backup tool with version history.
- History is long enough. Keep at least 30 daily versions and several monthly ones. Our guide to backup retention explains a simple scheme.
Step 3: lock down network backup storage
If you back up to a NAS or another PC:
- Create a dedicated backup account on the NAS, used only by the backup software, with a strong password your everyday account does not know.
- Do not map the backup share as a drive letter. Let the backup tool connect to
\\nas\backupsdirectly with the backup account. - Remove your everyday account's write access to the backup share.
- Turn on the NAS's own snapshots, if it has them. Snapshots taken by the NAS cannot be deleted from your PC.
- Keep the NAS updated and do not expose its admin page to the internet.
Step 4: encrypt your backups
Encryption does not stop ransomware encrypting a drive it can reach, but it matters for a related threat: many attackers now steal data before encrypting it and threaten to publish it. An encrypted backup on a stolen or exposed drive is useless to them. It also protects you if a backup drive is lost.
You can use BitLocker on the backup drive (BitLocker To Go is available in Windows Pro and higher editions), or a backup program that encrypts each backup with a password.
Step 5: turn on Controlled folder access
Windows Security includes ransomware protection that blocks untrusted apps from changing files in protected folders. It is off by default.
- Open Windows Security → Virus & threat protection.
- Under Ransomware protection, click Manage ransomware protection.
- Turn on Controlled folder access.
- Click Protected folders to add your backup drive's folders and any work folders.
- If a trusted program, such as your backup software, is blocked, add it under Allow an app through Controlled folder access.
It is not a replacement for backups, and it can block legitimate programs at first, but it is a useful extra layer.
Step 6: keep an offsite or cloud copy
An offsite copy protects against ransomware and also fire, theft and flood. Options include a rotated drive kept elsewhere, a NAS at another location, an FTP or SFTP server, or cloud storage you control. Our comparison of local backup vs cloud backup covers the trade-offs.
Putting it together
| Copy | Where | Protects against |
|---|---|---|
| Daily versioned backup | NAS with a separate backup account | Deleted files, quick restores |
| Weekly backup and system image | External drive, unplugged between runs | Ransomware, dead drives |
| Offsite copy | Rotated drive or remote storage | Fire, theft, total loss |
Rocket Backups can handle each part of that plan. It keeps version history so you can restore files as they were before an infection, encrypts every backup with AES-256 and a password, and can start a backup when you plug in the drive so it can stay disconnected the rest of the time. You can also send the same backup to two places, such as a NAS and an external drive.
Check your backups regularly
Protection only helps if the backups are actually running and readable. Some ransomware damages files slowly, and a backup job that has quietly failed for a month leaves you with nothing recent. Once a month:
- Confirm the last successful backup date for each copy, including the offline drive.
- Restore a few files from an older version and open them.
- Watch for warning signs, such as backups suddenly growing much larger than usual, which can mean many files changed at once.
If ransomware strikes
- Disconnect the PC from the network immediately, and do not plug in any backup drive.
- Clean or reinstall the PC first. Restoring onto an infected system just gets your backup encrypted.
- Restore from a version dated before the infection, and check the files open.
Our step-by-step guide to recovering files after a ransomware attack covers this in more detail, including how Rocket Backups lets you pick the right restore point from its timeline.
Frequently asked questions
Can ransomware spread to a NAS?
Yes, if the infected PC can write to a mapped share. Use a separate account for backup access and avoid leaving backup shares mapped all the time.
What is an air-gapped backup?
A backup that is physically disconnected from the PC and network when not in use, such as an external drive you unplug after each run.
Does Windows have ransomware protection built in?
Yes. Windows Security includes Controlled folder access, which blocks untrusted apps from changing files in protected folders. It is off by default.
