
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeGood news - you won't wipe your dataset! Your Sanity content lives in the cloud, not in your local VS Code files. Your backup project files just contain the connection configuration to access that data, so you're safe to restore them on your new machine.
Here's what you need to do:
Install Node.js and npm on your new machine (if not already installed)
Restore your VS Code project files from your backup to your new machine
Install dependencies - Navigate to your project folder and run:
npm installCheck your configuration - Your project should have a sanity.cli.js (or sanity.cli.ts) file in the root that contains your project ID and dataset name:
export default defineCliConfig({
api: {
projectId: 'your-project-id',
dataset: 'production' // or 'projecttest'
}
})Authenticate - Run this command to log in to your Sanity account:
npx sanity loginThis will open a browser window for authentication and store your credentials locally.
Start your Studio (if you're running Sanity Studio locally):
npm run devThat's it! Your project will connect to your existing dataset without any issues. The sanity login command just authenticates your machine - it doesn't affect your content at all.
If your backup doesn't include the sanity.cli.js file, you can recreate it manually. You'll need:
Just create the configuration file with those values, and you'll be connected to your existing data.
Your content is completely safe in Sanity's cloud - these configuration files are just the "key" to access it, not the data itself!
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