Course contentsShow
← Databases & SQL
Lesson 1559 of 1,95314. High Availability and DurabilityFree lesson

Immutable Backup Storage

Implement write-once-read-many policies to protect backups against ransomware and accidental deletion.

In this lesson, you will learn how to implement Write-Once-Read-Many (WORM) policies to fortify your database backups against ransomware and accidental deletion.

The Problem: Deletable Backups

In previous lessons, we discussed full, incremental, and offsite backups. However, traditional backups are often stored in filesystems that grant standard administrative credentials full "read-write-delete" access. If an attacker gains administrative access to your infrastructure, or if a catastrophic human error occurs, your backups can be deleted or encrypted by ransomware, rendering your disaster recovery strategy useless.

Implementing WORM Policies

Immutable backup storage changes the storage contract. Once a backup file is written, the storage layer enforces a policy that prevents any modification or deletion of that object for a predefined "retention lock" period.

Think of it as a physical digital safe: you can put files inside, but the lock mechanism physically prevents the door from opening until the timer expires. Even an administrator with root access cannot delete the data until the policy retention period (e.g., 30 or 90 days) has passed.

Technical Implementation

Most enterprise cloud storage solutions support object-level locking. When you push your SQL dump or transaction logs to an S3-compatible bucket, you apply a Retention Configuration. For instance, in an object storage policy, you might define:

{
  "Rule": {
    "Status": "Enabled",
    "DefaultRetention": {
      "Mode": "COMPLIANCE",
      "Days": 30
    }
  }
}

In this configuration, once your database backup is uploaded, the storage provider rejects any DELETE or PUT request targeting that object until the 30-day window closes. This ensures that even if your production database is compromised and the attacker attempts to wipe your "offsite" backups to prevent recovery, the backups remain shielded by the storage layer’s immutable policy.

By decoupling the authority to manage the database from the authority to manage the backup storage lifecycle, you create a "Compliance Mode" safety net that survives even the most severe security breaches.

Key Takeaway: Immutable backup storage provides an essential final line of defense by enforcing WORM policies that physically prevent the deletion or alteration of backups, regardless of administrative credentials or malicious intent.