Duplicating datasets in admin dashboard and using CLI for imports
Unfortunately, there isn't a one-click "duplicate dataset" button in the Sanity admin dashboard at manage.sanity.io like you might find in Contentful. However, Sanity offers several approaches depending on your plan tier:
Enterprise Plan: Cloud Clone
If you're on an Enterprise plan, you get access to Cloud Clone as part of Advanced Dataset Management. This is the closest equivalent to Contentful's behavior - it duplicates datasets entirely in the cloud without needing to download/upload data. You can easily spin up a staging environment from production and delete/recreate as needed.
Cloud Clone also comes with Hot Swap, which lets you create aliases that can seamlessly switch between datasets - super useful for testing migrations or validating changes before going live.
To access these features, you'll need to contact Sanity's sales team about upgrading to an Enterprise plan.
For Other Plans: CLI or Plugin
If you're not on Enterprise, you have two main options:
1. CLI Export/Import (all plans)
The standard approach uses the Sanity CLI:
# Export from production
sanity dataset export production production-backup.ndjson
# Import to staging
sanity dataset import production-backup.ndjson staging --replaceThe --replace flag will clear the target dataset first, giving you that "delete and spin up fresh" workflow you're looking for.
2. Cross Dataset Duplicator Plugin (all plans)
This community plugin by Simeon Griggs adds a GUI within Sanity Studio for migrating documents and assets between datasets. It's more user-friendly than the CLI and doesn't require technical knowledge, though it's still not quite as streamlined as a dashboard button.
Install it with:
npm i @sanity/cross-dataset-duplicatorWhile Sanity's approach requires a bit more manual work compared to Contentful's dashboard UI, the CLI method is reliable and the Enterprise features provide the most seamless experience if dataset duplication is a frequent need in your workflow.
Sanity – Build the way you think, not the way your CMS thinks
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.