
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeI'm really sorry to hear about this situation - accidentally overwriting production data is incredibly stressful. Let me clarify what options are available to you.
First, it's important to distinguish between two different Sanity features:
Document History/Revisions: This is automatically enabled for all plans and tracks individual document changes over time. However, the retention period is limited based on your plan:
Backups: This is a separate enterprise-only feature that provides managed dataset snapshots with longer retention policies. This feature must be manually enabled via the CLI and is not available on the Team plan.
Unfortunately, the Team plan (which has been deprecated in favor of the current Free/Growth/Enterprise tiers) does not have access to the managed Backups feature. This means Sanity doesn't automatically create full dataset backups that you can restore.
However, you may still be able to recover your data depending on your plan's document history retention:
The document revision system keeps track of individual document changes. If your Team plan includes revision history similar to the Growth plan (90 days), your documents from "yesterday" should still exist in the revision history.
Important limitation: The History API is designed for restoring individual documents, not bulk dataset restoration. You would need to:
This is technically possible but extremely time-consuming for an entire dataset.
Given that you've overwritten your entire production dataset, you need to contact Sanity support immediately. Reach them through your Sanity dashboard or at support@sanity.io.
Explain:
Support may be able to:
Time is critical - the sooner you contact them, the better your chances of recovery.
Sanity does not automatically create or store full dataset backups for you unless you're on an Enterprise plan with the Backups feature enabled. This is a common misconception - document history is not the same as dataset backups.
Once you've resolved this situation, you should implement your own backup strategy using the dataset export CLI command:
# Manual backup
sanity dataset export production backup-$(date +%Y%m%d).tar.gzYou can automate this with:
Also consider:
Contact Sanity support immediately - they're your best hope for recovery. Don't make any more changes to your production dataset until you've spoken with them or begun a recovery process. While document history may preserve individual document versions from yesterday, recovering an entire overwritten dataset is not something you can easily do yourself with the available tools.
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store