Home › Learn › Databricks interview prep › Backup and recovery
Databricks interview prep · data engineering
Backup and recovery on Azure Databricks
What Azure Databricks gives you for backup and recovery (time travel, RESTORE, UNDROP, clones, storage features) and what you must build, with a practical pattern.
Defaults, limits and preview status change often. Check the current Databricks docs before quoting a number.
Four layers; Databricks gives you tools for the first two, you build the rest.
Based on documentation and experience, not tested on an Azure workspace here. Storage features change; check Azure and Databricks documentation, especially for ADLS Gen2 with hierarchical namespace.
Short answer
What comes out of the box, and what you build
| Need | Out of the box | You build |
|---|---|---|
| Undo a bad write to a table | Delta time travel and RESTORE (limited by retention and VACUUM) | Nothing |
| Recover a dropped managed table | UNDROP for Unity Catalog managed tables within a window (documented as seven days; check) | Nothing |
| Protect against deleted files or a lost folder | ADLS soft delete for blobs and containers; locks; immutable storage | Policy and testing |
| Survive a region outage (data) | Geo-redundant storage (GRS/GZRS) copies data to the paired region, asynchronously | Validation: the copy is not guaranteed to be consistent across a table's log and files |
| A real, consistent copy of a table | Deep clone (copies data and log; can be re-run incrementally) | A scheduled job per table or schema, in another account, subscription or region |
| Recover notebooks and code | Git folders | Discipline: everything in Git |
| Recover jobs, pipelines, clusters, permissions | Nothing automatic | Asset Bundles or Terraform as the source of truth |
| Recover Unity Catalog objects (catalogs, schemas, grants, external locations) | No backup button | Terraform or scripts as the source of truth |
| Secrets | Key Vault-backed scopes keep secrets in Key Vault | Key Vault backup policy |
| Full workspace failover | Nothing one-click | A secondary workspace, replicated data, config redeployed from code, a runbook, and drills |
Recommended
A practical pattern
- Make everything reproducible from code: notebooks in Git, jobs and pipelines in Asset Bundles or Terraform, Unity Catalog objects in Terraform.
- Keep Delta time travel for mistakes: choose a retention period you can afford and do not VACUUM below it.
- Protect storage: soft delete, resource locks, and immutable or write-once storage for the backup account.
- Copy important tables with deep clone on a schedule to a separate storage account (ideally another subscription and region). Shallow clones are not backups.
- For disaster recovery: a secondary workspace, with the same bundles deployed, reading the replicated data. Decide RPO and RTO per data product, not for everything.
- Test restores regularly. An untested backup is a guess.
Traps
Things that surprise people
- Geo-replication copies mistakes and deletes too, and is not a point-in-time backup.
- Asynchronous replication can leave a Delta log pointing at files that have not arrived yet; test failover on real tables.
- Time travel is not a backup: VACUUM and retention limits remove it, and deleting storage removes everything.
- Measured: after VACUUM, RESTORE to an old version failed with “Not all files from version 0 are available in file system.”, and a shallow clone of the vacuumed table could not be read.
- Managed tables live in Unity Catalog-managed storage; protect that storage account like production.
- Dashboards, Genie spaces, alerts and MLflow assets may not be covered by your table backups; export or define them as code.
Practice
Questions to rehearse
- Time travel, clone and geo-redundancy: which protects against what?
- Why is a shallow clone not a backup?
- What would you build for a region failure?
- How do you recover jobs and Unity Catalog objects?
- How often do you test restores, and how?
FAQ
Questions people ask
Is there a built-in Databricks backup?
For tables, time travel and clones. For workspace objects there is no automatic backup, so use Git and infrastructure as code.
Is geo-redundant storage a backup?
No. It replicates, including deletes and corruption.
Next
Where to go next
All Databricks interview topics · All data engineering · Databricks on this site