Backup for Databases & Unstructured Data
Database PITR, geo-restore, long-term retention, and blob/file backup β design data backup strategies that match compliance requirements and recovery objectives.
Database backup design
Azure SQL databases are automatically backed up. You donβt configure it β it just happens. The design question is: how long do you keep those backups, and can you restore across regions?
PITR (Point-in-Time Restore): Restore to any second within the retention window (7-35 days).
Long-term retention (LTR): Keep weekly/monthly/yearly backups for up to 10 years.
Geo-restore: Restore from the most recent geo-replicated backup in a different region.
Azure SQL backup architecture
| Backup Type | Frequency | What It Captures | Automatic? |
|---|---|---|---|
| Full | Weekly | Entire database | Yes |
| Differential | Every 12-24 hours | Changes since last full | Yes |
| Transaction log | Every 5-10 minutes | All transactions since last log backup | Yes |
Recovery options
| Option | RPO | RTO | Scope | Best For |
|---|---|---|---|---|
| Point-in-time restore (PITR) | Seconds (log backup interval) | Minutes to hours | Same region | Accidental deletion, corruption β restore to any second |
| Long-term retention (LTR) | Weekly/monthly/yearly | Hours | Same or different region | Compliance β keep backups for years |
| Geo-restore | ~1 hour (geo-replication lag) | Hours | Different region | Regional disaster β restore from geo-replicated backup |
| Active geo-replication | ~5 seconds | Seconds | Different region | Low-RPO DR β readable secondary with fast failover |
| Auto-failover groups | ~5 seconds | Seconds (automatic) | Different region | Automatic DR failover with read/write endpoint redirection |
π¦ Elenaβs SQL backup design:
- PITR retention: 35 days (maximum) for all production databases
- LTR: Weekly backups retained 52 weeks, monthly retained 12 months, yearly retained 7 years
- Auto-failover group: Trading database replicated to paired region with automatic failover
- Geo-restore: Enabled as a last-resort recovery option for non-critical databases
Cosmos DB backup
| Factor | Continuous Backup | Periodic Backup |
|---|---|---|
| Restore granularity | Any point in time (last 7 or 30 days) | Specific backup intervals (1-24 hours) |
| RPO | Seconds | Hours (interval-dependent) |
| Self-service restore | Yes β via portal/CLI | No β support ticket required |
| Cost | Included (7-day) or additional (30-day) | Included in Cosmos DB pricing |
| Best for | Production β accidental deletes, corruption | Non-critical β basic protection |
Design recommendation: Always use continuous backup for production Cosmos DB accounts. The ability to self-service restore to any point in time is critical for operational recovery.
Unstructured data backup
| Feature | What It Protects | How It Works |
|---|---|---|
| Soft delete | Accidental deletion | Deleted blobs recoverable for configured period (1-365 days) |
| Blob versioning | Accidental overwrite | Previous versions automatically retained |
| Point-in-time restore | Bulk corruption/deletion | Restore ALL block blobs in a container to a previous state |
| Azure Backup for Blobs | Operational + vault backup | Policy-driven backup with long-term retention in vault |
| Immutable storage | Malicious deletion/modification | WORM β cannot be deleted even by admins during retention |
ποΈ Priyaβs unstructured data backup:
- Soft delete: 30 days on all production containers
- Blob versioning: Enabled for document storage (track changes)
- Point-in-time restore: Enabled for critical containers (bulk recovery)
- GZRS redundancy: Cross-region durability for all production storage
Knowledge check
π¦ Elena's compliance team requires Azure SQL database backups retained for 7 years. They also need the ability to restore to any second within the last 35 days for operational recovery. Which combination should Elena configure?
ποΈ David's government client stores legal documents in Azure Blob Storage. Regulations require that documents cannot be modified or deleted for 10 years after upload. Staff must still be able to read documents at any time. Which storage feature should David configure?
π¬ Video coming soon
Next up: Data is backed up β now letβs keep it running β High Availability for Compute.