
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeYes, absolutely! Sanity provides several ways to backup your content, with the most common being the CLI export command.
The easiest way to backup your content is using the Sanity CLI:
sanity dataset export productionThis creates a production.tar.gz file containing all your documents and assets. You can also specify a custom filename:
sanity dataset export production ./backups/backup-2024-01-15.tar.gzThe export includes:
It does not include your schema definition (that lives in your Studio code) or access control settings.
If you only need the document data (not images/files), you can export to NDJSON format:
sanity dataset export production backup.ndjson --no-assetsTo restore or import a backup:
sanity dataset import production.tar.gz productionThis merges the backup content with your existing dataset. Always test imports on a development dataset first!
Since Sanity doesn't store backups for you, consider setting up automated backups using:
If you're on an Enterprise plan, Sanity offers managed backup features with:
Always export your dataset before running content migrations:
# Backup first
sanity dataset export production backup-before-migration.tar.gz
# Run your migration
sanity migration run your-migration
# Restore if needed
sanity dataset import backup-before-migration.tar.gz productionThe CLI export/import workflow is reliable and gives you complete control over your content backups!
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