Prerequisites
- Access to Neon Console
- Xata account and project setup with a running
mainbranch
Install and configure the Xata CLI
Install the Xata CLI:Find the Neon connection string
Neon connection strings typically look something like this:- Go to Neon Console → Your Project
- Select the branch you want to copy from
- Click “Connect” to get the “Connect to your database” modal
- Unset the Connection pooling toggle
- Select “Connection string” in the dropdown
- Click “Copy snippet” to copy it, including the password
Initialize Xata project
Go to a local folder that you want to save the Xata configuration to and initialize it like this:xata) or use the same that you have in Neon. If the database doesn’t exist, it will be created.
In case you need to redo this step, you can reset the configuration by deleting the .xata/project.json file and running xata init again.
Start the migration
Begin the data transfer:Verification
After migration, verify your data:-
Connect to Xata Branch:
-
Check Data Integrity: