ThisCalculator

Everyday

Ransomware-Resistant Backup Strategy: Offline & Immutable

Updated · Standard formula, shown below

This guide walks you through building a backup strategy that survives ransomware attacks by combining offline (air-gapped) backups with immutable (write-once) backups. You’ll learn the exact steps to create multiple layers of protection, verify integrity, and recover quickly—even if your primary systems are fully encrypted.

What You’ll Need

  • At least one external hard drive or NAS with versioning support
  • Cloud storage that supports object lock or immutable snapshots (e.g., AWS S3 Object Lock, Azure Blob immutability, Backblaze B2 with Object Lock)
  • A backup software tool that supports versioning and encryption (e.g., Veeam, Duplicati, restic, BorgBackup)
  • A separate admin account for backup management (not used for daily work)
  • Physical access to the offline drive (or a trusted person who can plug it in)
  • Basic familiarity with command line or your backup tool’s interface

Step-by-Step

  1. Define your recovery point objective (RPO) and recovery time objective (RTO). Decide how much data you can afford to lose (e.g., 24 hours) and how fast you need to restore (e.g., 4 hours). This determines backup frequency and storage location.
  2. Choose a 3-2-1-1-0 approach. Keep at least 3 copies of your data, on 2 different media, with 1 copy offsite, 1 copy offline/immutable, and 0 errors after restore testing. This is the gold standard for ransomware resilience.
  3. Set up your primary backup to a local NAS or external drive. Use a tool that supports incremental-forever backups with versioning. Configure encryption at rest (AES-256) and enable application-aware processing for databases and mail servers.
  4. Enable immutable snapshots on your NAS. If using a modern NAS (Synology, QNAP, TrueNAS), turn on the snapshot feature with a retention policy (e.g., hourly for 24h, daily for 30d). Snapshots are not writable by ransomware that gains access to the live filesystem.
  5. Configure an offline backup. Connect an external drive, run a full backup, then disconnect it and store it in a safe (or a different physical location). Schedule this weekly or monthly. Label each drive with the date. Rotate at least two drives so one is always offline.
  6. Set up immutable cloud storage. Create a bucket with Object Lock enabled (or use a service that offers immutable versioning). Set a retention period (e.g., 30 days) that prevents deletion or overwriting. Configure your backup software to send encrypted backups to this bucket.
  7. Separate backup credentials. Use a dedicated service account with minimal permissions—only write to the backup location and read for restore. Do not use your main admin account. Enable multi-factor authentication on the backup console.
  8. Schedule automated backups. Run incremental backups every few hours, and a full backup weekly. Ensure the backup job sends a notification on success/failure.
  9. Test restores monthly. Pick a random file or a virtual machine and restore it to a test environment. Verify data integrity and that the restore process works. Document the steps.
  10. Document your recovery runbook. Write down exactly how to restore from each backup type (local, offline, cloud). Include contact info for the person who has the offline drive, and the steps to unlock the encryption keys.

Common Mistakes

  • Keeping the offline drive always connected. If it’s plugged in, ransomware can encrypt it. Unplug it after each backup.
  • Using the same admin account for backups and daily work. A compromised account can delete backups. Use a separate, locked-down account.
  • Not enabling versioning on the local backup. Without versioning, a ransomware attack that encrypts the backup repository will overwrite your only copy.
  • Ignoring cloud immutability settings. Just storing in the cloud isn’t enough; if the cloud provider allows deletion, ransomware could delete it via your API keys.
  • Not testing restores. Backups that haven’t been restored are just hopes. Test monthly.
  • Using a backup tool that doesn’t support encryption. If your backup is unencrypted, an attacker who gains access to the storage can read your data.

Tips

  • Use the ‘write once, read many’ (WORM) model for cloud storage. Even if an attacker gets your API key, they cannot modify or delete objects during the retention period.
  • Store the offline drive in a fireproof safe. Also consider a second offsite offline drive (e.g., at a friend’s house) for disaster recovery.
  • Encrypt your backups with a key you control. If using a cloud provider, use client-side encryption so the provider cannot read your data.
  • Monitor your backup logs. Set up alerts for failed backups or unusual deletions.
  • Keep a copy of your encryption keys offline. If ransomware encrypts your systems, you’ll need the keys to restore—don’t let them be encrypted too.
  • Consider a dedicated backup server with immutable filesystem. Tools like OpenZFS with snapshots or a hardened Linux server with `chattr +i` on backup files can add an extra layer.

Troubleshooting

  • Backup fails with ‘permission denied’. Check that the backup service account has write access to the target location. Verify the encryption key is accessible (e.g., not stored on an encrypted drive that isn’t mounted).
  • Immutable cloud storage won’t allow deletion for testing. That’s expected. To test, create a separate test bucket with a short retention period (e.g., 1 day) and test there.
  • Offline drive is full. Use a larger drive or rotate more frequently. Consider using incremental backups to a second drive, or compress backups.
  • Restore is slow. For large restores, prioritize critical systems first. Use parallel restore if your tool supports it, and ensure the network path is fast.
  • Ransomware encrypted your backup console. If you have an offline copy, you can restore the backup software from it. If not, reinstall the software and then restore data from the immutable cloud or offline drive.
  • Object Lock retention period is too long. You can’t shorten it, but you can create a new bucket with a shorter period for future backups. Plan retention based on how long you might need to detect an attack.

Frequently Asked Questions

What is the difference between offline and immutable backups?

Offline backups are physically disconnected from the network, so ransomware can’t reach them. Immutable backups are stored on a system that prevents modification or deletion for a set period, even if the attacker has network access. Both are critical: offline for physical isolation, immutable for logical protection.

How often should I take an offline backup?

At least weekly, but it depends on your RPO. If you can afford to lose a week of data, weekly is fine. For tighter RPO, take a daily offline backup (e.g., using a rotating set of drives) or use immutable cloud as your near-real-time backup and offline as a weekly safety net.

Can ransomware attack immutable backups?

Immutable backups are designed to resist modification, but no system is 100% foolproof. An attacker could exploit a vulnerability in the backup software or the storage system itself. That’s why you also keep an offline copy—it’s immune to any network-based attack.

Do I need to encrypt my backups?

Yes. Encryption protects your data if the backup media is stolen or if the cloud provider is breached. Use strong encryption (AES-256) and manage keys separately from the backup data.

What is the 3-2-1-1-0 rule?

It’s an extension of the classic 3-2-1 rule: 3 copies of your data, on 2 different types of media, with 1 copy offsite. The extra ‘1’ is for an offline or immutable copy, and the ‘0’ means zero errors after restore testing. This is the recommended standard for ransomware resilience.

How do I test my backups without disrupting production?

Use a separate test environment (e.g., a virtual machine) and restore a subset of data. You can also perform a ‘dry run’ restore of a single file to verify integrity. For critical systems, schedule a full restore test during maintenance windows.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.