
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag stoređŹ I feel your friend's pain! Unfortunately, Sanity doesn't have a built-in way to do a full dataset rollback to a previous date or bulk-undo across all documents.
What Sanity DOES offer:
Document History lets you restore documents one at a time by viewing their revision history and rolling back to a previous version. You can access this through the document status indicator at the bottom of the editor or via the contextual menu (ellipsis icon) â "History".
Important limitations:
For bulk restoration:
If your friend needs to restore multiple documents, they'd need to use the History API programmatically. You could:
_rev property)createOrReplace() method to restore each documentThis would essentially be a custom script to loop through documents and restore them individually. Not ideal, but it's the available path.
Prevention tip: For future peace of mind, consider exporting dataset backups regularly using the sanity dataset export CLI command. That way you have a safety net outside of the built-in history retention!
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