Prerequisites
- DigitalOcean Managed Database for PostgreSQL
- Access to DigitalOcean Console
- Xata account and project setup
- Network access to your DigitalOcean database
Install and Configure the Xata CLI
Install the Xata CLI:Network Configuration
Option 1: Public Access (Default)
DigitalOcean Managed Databases are typically accessible from the internet:- No additional configuration needed for public access
- SSL is required by default
- Connection limits may apply based on your plan
Option 2: Private Network (Premium Plans)
If you’re on a Premium plan with private network:-
Enable Private Network:
- Go to your database cluster → “Settings” → “Networking”
- Enable “Private Network”
- Configure VPC peering if needed
-
Run Migration from DigitalOcean:
- Use Droplets in the same private network
- Use App Platform or Functions in the same VPC
Get Connection String
Find Your Connection Details
- Go to DigitalOcean Console → Databases
- Click on your PostgreSQL cluster
- Go to “Settings” → “Connection Details”
- Copy the connection string
Connection String Format
DigitalOcean connection strings typically look like this:Initialize Xata Project
Set up your Xata project configuration:Configure the Migration
Set up your clone configuration with optional anonymization:Start the Migration
Begin the data transfer:Monitor Progress
Check the migration status:Verification
After migration, verify your data:-
Connect to Xata Branch:
-
Check Data Integrity:
- Test Relationships: Verify foreign key relationships work correctly
Next Steps
- Explore Xata branching for development workflows
- Learn about schema changes with zero downtime
- Set up continuous sync for ongoing replication
- Consider deployment options for your Xata instance