ThisCalculator

Everyday

Immutable Backups: Ransomware-Proof Setup Guide

Updated · Standard formula, shown below

This guide walks you through setting up immutable backups—copies of your data that cannot be modified, encrypted, or deleted, even by an attacker with admin access. You’ll learn how to configure object lock on cloud storage and on-premises appliances, plus the verification steps to confirm your backups are truly ransomware-proof.

What You’ll Need

  • A backup solution that supports object versioning and retention policies (e.g., Veeam, Commvault, or a script using AWS CLI).
  • Cloud storage with object lock support (AWS S3, Azure Blob, Wasabi, Backblaze B2) or an on-premises appliance that supports WORM (Write Once, Read Many) or object lock (e.g., Synology, QNAP, or dedicated backup appliances).
  • Administrative credentials to configure storage and backup software.
  • Basic understanding of your backup schedule and retention requirements.

Step-by-Step

  1. Choose your immutable storage target. For cloud, select a bucket or container that supports object lock. For on-premises, ensure your NAS or appliance supports WORM or object lock (often called “Compliance” or “Governance” mode).
  2. Enable versioning on the storage target. In AWS S3, go to the bucket properties and enable “Bucket Versioning”. In Azure, enable “Versioning” on the blob container. For on-premises, enable the equivalent feature in the storage admin panel.
  3. Configure object lock retention. Set a default retention period (e.g., 30 days) that applies to all new objects. In S3, go to the bucket’s “Management” tab → “Object Lock” → “Enable” and choose either “Governance” or “Compliance” mode. Governance mode allows privileged users to bypass retention, while Compliance mode prevents anyone from deleting or changing objects until the retention period expires. For maximum ransomware protection, use Compliance mode.
  4. Apply retention to existing objects. If you already have backups, apply the retention policy to them via CLI or the storage console. For S3, use the put-object-retention command.
  5. Configure your backup software to write to the immutable target. In Veeam, create a new backup repository pointing to the S3 bucket or on-premises share. Ensure the backup job uses the “Object Lock” or “Immutable” option if available. In other tools, verify that the backup writes are compatible with object lock (e.g., use S3-compatible APIs).
  6. Set up a separate backup identity with minimal permissions. Create a service account that only has write access to the backup target, not delete or overwrite permissions. This prevents an attacker from using the backup system’s credentials to remove backups.
  7. Test the immutability. After the first backup, attempt to delete or modify a backup file using the storage console or CLI. If the retention is active, you should receive an error like “AccessDenied” or “Object is protected”. Also try to overwrite an object—it should fail.
  8. Monitor and alert. Set up alerts for any attempt to delete or modify backups, and for when retention periods are about to expire. Use cloud monitoring (e.g., CloudTrail for S3) or your backup software’s reporting.
  9. Document your recovery process. Write down how to restore from the immutable backups, including the exact steps to access the storage and the retention period details. Test a restore regularly.

Common Mistakes

  • Using Governance mode without a strong break-glass policy. Governance mode allows admins to bypass retention, so if an attacker compromises the admin account, they can remove backups. Use Compliance mode for critical data.
  • Not enabling versioning before object lock. Object lock requires versioning to be enabled; otherwise, it won’t work.
  • Setting retention too short. If the retention period is shorter than your typical ransomware detection time, the attacker can wait it out and then delete the backups. Set retention to at least 30 days, or longer if possible.
  • Giving backup software too many permissions. If the backup software has delete permissions, an attacker who compromises it can erase backups. Use the principle of least privilege.
  • Forgetting to test immutability. Many assume it works without testing. Always verify that deletion attempts fail.

Tips

  • Use a separate AWS account or cloud subscription for backups, so that even if your main account is compromised, the backup storage is isolated.
  • Consider using a different cloud provider for backups than your primary infrastructure to avoid a single point of failure.
  • For on-premises, use an appliance that is not domain-joined and has a separate admin password, stored in a physical safe or password manager.
  • Regularly review your retention policies and adjust them based on your recovery point objectives (RPO) and recovery time objectives (RTO).
  • Enable multi-factor authentication (MFA) on all accounts that can access the backup storage.

Troubleshooting

  • Object lock not working: Ensure versioning is enabled on the bucket/container. Check that the retention period is set and that you’re using the correct mode (Governance vs. Compliance). Try applying retention to a test object via CLI.
  • Backup job fails with permission errors: Verify that the backup service account has write permissions to the target. For S3, ensure the IAM policy includes s3:PutObject and s3:GetObject, but not s3:DeleteObject.
  • Can’t delete an object even after retention expires: Check if the object has a legal hold. In S3, legal hold prevents deletion regardless of retention. Remove the legal hold if you no longer need it.
  • Backup software doesn’t support object lock: Use a tool that does, or use a script that calls the storage API directly. For example, use AWS CLI to copy files to S3 with the --object-lock-mode parameter.
  • Storage costs rising: Object lock stores multiple versions, which increases storage usage. Set a lifecycle policy to delete old versions after a certain period, but ensure it does not delete versions before the retention period ends.

Frequently Asked Questions

What is the difference between Governance and Compliance mode?

Governance mode allows users with special permissions to bypass retention for legal or administrative purposes. Compliance mode prevents anyone, including the account root, from deleting or altering objects until the retention period expires. For ransomware protection, Compliance mode is stronger.

Can ransomware encrypt immutable backups?

No. Immutable backups are write-once-read-many (WORM). Once written, they cannot be modified or encrypted by anyone, including the backup software, until the retention period expires. Even if an attacker gains admin access, they cannot alter the backups.

How long should I set the retention period?

Set it longer than your maximum expected time to detect a ransomware attack. A common recommendation is 30 days, but some organizations use 90 or 365 days for critical data. Balance cost with risk.

Can I use immutable backups with any cloud provider?

Most major providers support object lock: AWS S3, Azure Blob, Google Cloud Storage, Wasabi, Backblaze B2, and others. Check your provider’s documentation for “Object Lock” or “WORM” support.

Do I need special backup software?

No, but the software must be able to write to the storage target. Many backup tools (e.g., Veeam, Commvault, Duplicati) support S3-compatible storage. If your software doesn’t support object lock directly, you can use a script to upload files with the lock enabled.

How do I restore from an immutable backup?

Restore is just like a normal restore from cloud storage. Use your backup software to browse the backup files and restore them to your system. The immutability only affects writes and deletes, not reads.

Related

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