Skip to content

How to export and re-import Sanity data for different projects/users?

2repliesLast updated: Nov 13, 2026

its possible to export sanity data? and upload back on sanity if someone wants to reuse the application? for another user id etc
AI Update

Yes. Export the dataset to a .tar.gz file with the Sanity CLI, then import that file into a dataset in another project (or the same one). The archive holds your documents and asset files. Your schema lives in your Studio code, so you deploy that separately for the new project.

1. Export the dataset

npx sanity@latest login
npx sanity@latest datasets export production production.tar.gz

Exports count toward your API usage. See Export a dataset.

2. Create the target project and dataset

Create the new project, then create the dataset that will receive the data:

npx sanity@latest datasets create production --project-id <new-project-id>

3. Import the archive

npx sanity@latest datasets import production.tar.gz production --project-id <new-project-id>

See Importing data and the datasets CLI reference, or run npx sanity@latest datasets import --help.

4. Point the app at the new project

Configure the Studio and frontend copies with the new project ID and dataset, and deploy them. The new project has its own members and access settings.

Show original thread
2 replies

Was this answer helpful?

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.

Related contributions