Eine kontinuierliche (manchmal auch als laufende oder Onlinemigration bezeichnet) Migration ist ein kontinuierlicher Fluss von Änderungen von einer Quelle zu einem Ziel, der auf einen ersten vollständigen Dump- und Ladevorgang folgt. Wenn Sie bei einer Migration zum Lesen und Schreiben das Ziel verwenden möchten, führen Sie einen promote-Vorgang aus. Durch die Hochstufung wird die Verbindung der Cloud SQL-Ziel-Instanz zur Quelle getrennt und die Instanz wird von einer Replika-Instanz zu einer primären Instanz hochgestuft.
Bei der kontinuierlichen Migration gehen Sie so vor:
Zuerst wird ein Snapshot der Quelldatenbank erstellt.
Dadurch werden die Datenbanktabellen beim Erstellen des Dumps nacheinander für kurze Zeit (weniger als 10 Sekunden) gesperrt. Die Quelle kann weiterhin Schreibvorgänge akzeptieren.
Wenn Sie Amazon RDS verwenden und keine SUPERUSER-Berechtigungen haben, müssen Sie möglicherweise zusätzliche Schritte ausführen. Weitere Informationen finden Sie unter Migration von RDS MySQL ohne SUPERUSER-Berechtigungen.
Nach dem ersten Dump wird er in das Ziel geladen.
Nach Abschluss des Ladevorgangs werden die laufenden Änderungen (auch als Change Data Capture oder CDC bezeichnet) verarbeitet.
Wenn es an der Zeit ist, auf die Zielanwendung umzustellen, beenden Sie das Schreiben in der Quelle und initiieren Sie eine Werbeaktion. So kann die Anwendung Daten in der Zieldatenbank lesen und schreiben.
Bei abhängigen Anwendungen kann es zu einer Ausfallzeit von mindestens der Dauer der Replikationsverzögerung zum Zeitpunkt der Entscheidung zur Umstellung kommen.
Einmalige Migration
Bei dieser Art der Migration wird ein Snapshot der Datenbank zu einem bestimmten Zeitpunkt aus der Quelle abgerufen und auf das Ziel angewendet. Dabei werden Daten im Wesentlichen aus einem Speicherort in einen anderen kopiert. Das Ziel ist nach Abschluss der Datenübertragung einsatzbereit. Bei allen Anwendungen, die von der Quelldatenbank abhängen, kann es während der Migration zu Ausfällen kommen, da während der Migration keine neuen Schreibvorgänge in diese Datenbank möglich sind.
So führen Sie eine einmalige Migration durch:
Beenden Sie das Schreiben in die Quelldatenbank.
Starten Sie einen Dump der Quelldatenbank.
Nach Abschluss des Dumps wird er in das Ziel geladen. Sobald der Upload abgeschlossen ist, wird automatisch eine Werbeaktion gestartet. Die Zieldatenbank wird jetzt zur primären Datenbank und abhängige Anwendungen sollten Daten daraus lesen und in sie schreiben.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-05 (UTC)."],[[["\u003cp\u003eContinuous migration involves a full initial data dump and load, followed by an ongoing flow of changes from the source to the destination, with a \u003ccode\u003epromote\u003c/code\u003e operation switching the destination to primary.\u003c/p\u003e\n"],["\u003cp\u003eContinuous migration requires a snapshot to be taken, with a brief lockout on database tables, followed by an initial load, and then ongoing changes being captured and processed until promotion.\u003c/p\u003e\n"],["\u003cp\u003eOne-time migration is a single snapshot of the source database, transferred to the destination as a one-time dump and load, where the destination is ready for use after the load is finished.\u003c/p\u003e\n"],["\u003cp\u003eOne-time migration requires no further work after the load is completed, and writes to the source must be stopped.\u003c/p\u003e\n"],["\u003cp\u003eDependent applications might encounter downtime during the replication delay in continuous migration or during the entire migration process in a one-time migration.\u003c/p\u003e\n"]]],[],null,["# Types of migration\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nMySQL \\| [PostgreSQL](/database-migration/docs/postgres/migration-types \"View this page for the PostgreSQL version of Database Migration Service.\") \\| [PostgreSQL to AlloyDB](/database-migration/docs/postgresql-to-alloydb/migration-types \"View this page for the PostgreSQL to AlloyDB version of Database Migration Service.\")\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nOverview\n--------\n\n### Continuous migration\n\nContinuous (sometimes referred to as ongoing or online) migration is a continuous flow of changes from a source to a destination that follows an initial full dump and load. In the case of a migration, when the time comes to switch to use the destination for reads and writes, perform a `promote` operation. Promotion means that the destination Cloud SQL instance is disconnected from the source, and is promoted from a replica instance to a primary instance.\n\nContinuous migration follows these steps:\n\n1. Initially, a snapshot is taken of the source database.\n This incurs a short (under 10 seconds) lockout on the database tables, one at\n a time, as the dump is created. The source can continue accepting writes.\n\n\n You might need to perform additional steps if you're using Amazon RDS and\n you don't have SUPERUSER privileges. For more information, see\n [Migrating from RDS MySQL without SUPERUSER privileges](/database-migration/docs/mysql/rds-no-superuser).\n2. After the initial dump is taken, it's loaded into the destination.\n\n3. After the load is completed, the ongoing changes (also known as change data capture or CDC) are processed.\n\n | The delay between when a write occurs on the source and the current time is known as the `Replication delay`.\n\n \u003cbr /\u003e\n\n4. When the time comes to switch to using the destination, stop writing to the\n source and initiate a promotion. This allows the application to read and\n write against the destination database.\n\n5. Dependent applications can experience downtime for at least the\n duration of the replication delay at the time of the decision to promote.\n\n### One-time migration\n\nThis type of migration is a single point-in-time snapshot of the database,\ntaken from the source and applied to the destination. This is essentially a dump\nand load, where the destination is ready to be\nused when the load completes. Any applications that depend on the source database\ncan experience downtime during the migration process because there can be no new\nwrites to this database while the migration is in progress.\n\nOne-time migration follows these steps:\n\n1. Stop writing to the source database.\n\n2. Initiate a dump of the source database.\n\n3. After the dump is complete, it's loaded into the destination. When the load\n is completed, a promotion is initiated automatically. The\n destination database now becomes the primary database, and dependent\n applications should read and write to it."]]