Stay organized with collections
Save and categorize content based on your preferences.
MySQL | PostgreSQL | SQL Server
This page describes how you can move the location of your primary instance
to an external, self-managed server with a minimum of downtime.
Migrate data to an external server
To migrate the primary copy of your data from Cloud SQL to an external
server with the least downtime, you set up your external server as an
external replica, then demote the Cloud SQL instance to become the replica
of the external server.
This procedure requires you to complete the following high-level steps:
When the replica is fully synchronized with the Cloud SQL primary,
take your applications offline, and update the applications to point to
the external server.
Follow the instructions provided in
Demoting the primary instance of an external replica to demote the
Cloud SQL primary instance. Demoting the primary instance also promotes
the external server, making it the new primary instance.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Migrate data from Cloud SQL to an external server\n\n\u003cbr /\u003e\n\nMySQL \\| PostgreSQL \\| SQL Server\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nThis page describes how you can move the location of your primary instance\nto an external, self-managed server with a minimum of downtime.\n\nMigrate data to an external server\n----------------------------------\n\nTo migrate the primary copy of your data from Cloud SQL to an external\nserver with the least downtime, you set up your external server as an\nexternal replica, then demote the Cloud SQL instance to become the replica\nof the external server.\n\nThis procedure requires you to complete the following high-level steps:\n\n1. Create an external replica for your Cloud SQL instance, following the steps in [Configuring External Replicas](/sql/docs/mysql/replication/configure-external-replica).\n2. When the replica is fully synchronized with the Cloud SQL primary, take your applications offline, and update the applications to point to the external server.\n3. Follow the instructions provided in [Demoting the primary instance of an external replica](/sql/docs/replication/configure-external-replica#demote) to demote the Cloud SQL primary instance. Demoting the primary instance also promotes the external server, making it the new primary instance."]]