Prerequisites
- GCP Cloud SQL PostgreSQL instance
- Access to Google Cloud Console
- Xata account and project setup with a running
mainbranch - Network access to your Cloud SQL instance
Install and configure the Xata CLI
Install the Xata CLI:Find the Cloud SQL connection string
Form the 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 Cloud SQL. 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: