Prerequisites
- Self-hosted PostgreSQL instance
- Access to PostgreSQL configuration files
- Xata account and project setup with a running
mainbranch
Install and configure the Xata CLI
Install the Xata CLI:Find the connection string
Form your PostgreSQL connection string like this: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 the source PostgreSQL. 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: