Migrating DigitalOcean Managed Databases to AnubizHost
DigitalOcean Managed Databases are convenient but US-jurisdictional and not the cheapest option for steady workloads. This guide covers moving a Managed PostgreSQL or MySQL cluster to a self-managed instance on an AnubizHost offshore VPS, with a logical replication path for near-zero downtime cutover.
Need this done for your project?
We implement, you ship. Async, documented, done in days.
Get Connection Details and Plan Capacity
From the DigitalOcean panel, copy the connection string, CA certificate, and trusted source IPs. Note the database size (SELECT pg_database_size('dbname') for PostgreSQL, SELECT table_schema, SUM(data_length+index_length)/1024/1024 FROM information_schema.tables GROUP BY table_schema for MySQL).
Order an AnubizHost VPS with at least 2x the current database size in disk and enough RAM to hold the working set. Romania mid-tier VPS handles single-digit-GB workloads comfortably; Iceland EPYC dedicated handles larger workloads with predictable IOPS.
Install and Tune PostgreSQL or MySQL on the Target
For PostgreSQL: apt install postgresql-15, then tune postgresql.conf: shared_buffers to 25% of RAM, effective_cache_size to 75% of RAM, wal_level=logical for replication. Restart and create the target database matching the source name.
For MySQL: apt install mariadb-server-10.11, tune innodb_buffer_pool_size to 60-70% of RAM, set server-id=2 and enable binlog if you'll use replication. Create the schema and grants matching the source.
Initial Dump and Restore
PostgreSQL:
pg_dump -Fc -h do-host.db.ondigitalocean.com -U doadmin dbname > db.dump
pg_restore -d dbname -h localhost db.dump
MySQL:
mysqldump --single-transaction --routines --triggers --master-data=2 \
-h do-host -u doadmin -p dbname | mysql -u root dbname
For databases under 50GB, this is the simplest path. For larger workloads, use logical replication (PostgreSQL publication/subscription) or MariaDB/MySQL binlog replication to catch up in real-time.
Cut Over Application Connection Strings
Lower the TTL on your application's database hostname (if you use a DNS alias). Stop application writes briefly, run a final delta sync (or trust logical replication's near-zero lag), point connection strings at the new host, restart application servers, verify reads and writes.
Keep the DO managed database active for 24-48 hours as rollback. If something breaks, point connections back to DigitalOcean while you investigate. Decommission after 7 days of confirmed clean operation.
Operational Differences After Migration
Self-managed databases on AnubizHost give you full control - tuning, extensions, custom backups - and put the operational burden on your team. Most teams handle this with a backup cron (pg_basebackup or xtrabackup nightly to AnubizHost storage VPS) and monitoring (Prometheus + postgres_exporter or mysql_exporter). Related reading: database hosting, PostgreSQL migration deep-dive, MySQL migration deep-dive.
Related Services
Why Anubiz Host
Ready to get started?
Skip the research. Tell us what you need, and we'll scope it, implement it, and hand it back — fully documented and production-ready.