
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeGreat questions about backing up your Sanity datasets! Let me walk you through the different options available.
The best approach depends on your plan level:
For Enterprise plans: Sanity offers a managed backup feature that automatically creates daily backups of your dataset. This is the most robust solution with automated scheduling and retention policies (daily backups for 365 days, weekly backups for an additional 2 years).
For all plans: You can manually export your dataset using the Sanity CLI:
sanity dataset export productionThis creates a .tar.gz file containing all your documents and assets in NDJSON format.
No, backups cannot be created directly from the dashboard. You'll need to use the Sanity CLI for both the managed backup feature (Enterprise) and manual exports (all plans).
Enterprise plans only: Once you enable the backup service via CLI, Sanity automatically performs daily backups:
sanity backup enable productionYour first backup will be available within 24 hours, and the service continues running daily after that.
For other plans: You'll need to set up your own automation. A popular approach is using GitHub Actions to schedule regular exports and store them as artifacts or in cloud storage (S3, Google Cloud Storage, etc.).
Use the sanity dataset import command:
sanity dataset import backup-2024.tar.gz productionImportant gotcha: If you're importing into a different dataset than the backup originated from, add the --allow-assets-in-different-dataset flag.
For detailed restoration steps, check out the guide on restoring a deleted dataset from a backup.
Yes, absolutely! This is a common workflow. Here's how:
sanity dataset export production production-backup.tar.gzsanity dataset create developmentsanity dataset import production-backup.tar.gz development --allow-assets-in-different-datasetThe --allow-assets-in-different-dataset flag is required when importing across different datasets.
If you're on an Enterprise plan, there's also Cloud Clone which duplicates datasets directly in Sanity's cloud infrastructure without downloading anything locally - much faster for large datasets!
Backups contain:
Not included:
Hope this helps! The CLI export approach works for everyone, while the managed backup feature provides enterprise-grade automation and retention policies.
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