Durch die Beförderung wird die Verbindung der Cloud SQL-Zielinstanz zur Quelle getrennt und die Instanz wird von einer Replikat- zu einer primären Instanz hochgestuft.
Bei kontinuierlichen Migrationen können Sie den Prozess der Umstellung starten, wenn es an der Zeit ist, Lese- und Schreibvorgänge an das Ziel zu verschieben.
Bei einmaligen Migrationen ist die Cloud SQL-Instanz einsatzbereit, sobald das Dumpen und Laden abgeschlossen ist. Eine vom Nutzer initiierte Umstellung ist nicht erforderlich.
So stufen Sie eine Migration ohne Datenverlust hoch:
Klicken Sie auf den Migrationsjob, der die Migration darstellt, die Sie hochstufen möchten. Die Seite Migrationsjobdetails wird angezeigt.
Nachdem die Phase des vollständigen Dumps abgeschlossen ist und sich der Migrationsjob in der CDC-Phase befindet, ist die Option für die Hochstufung verfügbar.
Unmittelbar nach der Umstellung auf die CDC-Phase kann es je nach Größe des Dumps zu einer langen Replikationsverzögerung kommen, da die Cloud SQL-Ziellinie die Änderungen nachholt, die während des Dumps und des Ladens aufgetreten sind.
Warten Sie, bis die Replikationsverzögerung deutlich abnimmt, idealerweise auf Minuten- oder Sekundenebene. Die Replikationsverzögerung ist auf der Seite mit dem Migrationsjob verfügbar.
Sobald die Replikationsverzögerung auf ein Minimum reduziert ist, können Sie das Angebot starten.
Beachten Sie Folgendes, um Datenverluste zu vermeiden:
Beenden Sie alle Schreibvorgänge, laufenden Scripts und Clientverbindungen zur Quelldatenbank. Hier beginnt die Ruhezeit.
Warten Sie, bis die Replikationsverzögerung null ist. Das bedeutet, dass der Migrationsjob alle ausstehenden Änderungen verarbeitet hat.
Klicken Sie auf der Seite Migrationsjobdetails auf Hochstufen.
Klicken Sie im Fenster Migrationsjob hochstufen? auf Hochstufen.
Der Migrationsjob beendet das Lesen aus der Quelle und der Unterstatus ist Promote in progress. An diesem Punkt können Sie den Angebotsvorgang nicht mehr beenden oder rückgängig machen.
Die Zielinstanz wird zur primären beschreibbaren Instanz hochgestuft.
Der Status des Migrationsjobs ist Completed.
Die Anwendung kann jetzt mit der Cloud SQL-Instanz verbunden und der Migrationsjob kann sicher gelöscht werden.
Während einer Werbeaktion kann es zu folgenden Verhaltensweisen kommen:
Wenn Sie Migrationsjobs, die fehlgeschlagen sind oder während der CDC-Phase manuell angehalten wurden, in den Produktionsstatus versetzen, können die Daten in der Quelle und im Ziel inkonsistent sein.
[[["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\u003ePromotion disconnects the destination Cloud SQL instance from the source, transforming it from a replica to a primary instance.\u003c/p\u003e\n"],["\u003cp\u003eFor continuous migrations, promotion should occur after shifting reads and writes to the destination, while one-time migrations are ready for use immediately after the dump and load process is complete.\u003c/p\u003e\n"],["\u003cp\u003eTo prevent data loss, halt all writes to the source database and confirm the replication delay is at zero before initiating promotion.\u003c/p\u003e\n"],["\u003cp\u003eDuring promotion, the migration job ceases reading from the source, and once completed, the destination instance becomes the primary, writeable instance.\u003c/p\u003e\n"],["\u003cp\u003ePromoting failed or manually stopped migration jobs in the CDC phase can lead to data inconsistencies between the source and destination databases.\u003c/p\u003e\n"]]],[],null,["# Promote a migration\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nMySQL \\| [PostgreSQL](/database-migration/docs/postgres/promote-migration \"View this page for the PostgreSQL version of Database Migration Service.\") \\| [PostgreSQL to AlloyDB](/database-migration/docs/postgresql-to-alloydb/promote-migration \"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\n\u003cbr /\u003e\n\n\nPromotion means that the destination Cloud SQL instance is disconnected from\nthe source, and is promoted from a replica instance to a primary instance.\n\n\nFor continuous migrations, you can initiate the promotion process\nafter it's time to move reads and writes to the destination.\nFor one-time migrations, the Cloud SQL instance is ready as soon as the dump and load is complete, and user-invoked promotion isn't required.\n\nTo promote a migration without loss of information, follow these steps:\n\n1. Go to the [Migration jobs](https://console.cloud.google.com/dbmigration/migrations) page.\n2. Click the migration job that represents the migration that you want to promote. The **Migration job details** page appears.\n\n3. After the full dump phase has completed and the migration job is in CDC phase, the option for promotion is available.\n4. Immediately after transitioning to the CDC phase, depending on the size of the dump, there may be a long replication delay because the Cloud SQL destination instance catches up on changes that occurred during the dump and\n load.\n\n Wait for the replication delay to trend down significantly, ideally on the\n order of minutes or seconds. The replication delay is available for review on\n the migration job page.\n5. After the replication delay is at a minimum, you can initiate the promotion. To avoid data loss, make sure to:\n 1. **Stop all writes, running scripts, and client connections to the source\n database**. The downtime period begins here.\n 2. Wait until the replication delay is at zero, which means that the migration job has processed all outstanding changes.\n\n | You can promote a migration even if the replication delay isn't at zero. This can reduce the database downtime, but may affect the accuracy of the data in the destination.\n6. In the **Migration job details** page, click **Promote**.\n7. In the **Promote migration job?** window, click **Promote**.\n8. The migration job stops reading from the source and the substatus is `Promote in progress`. At this point, you cannot stop or undo the promotion process.\n9. The destination instance is promoted to a primary writeable instance. The migration job status is `Completed`.\n10. The application can now be connected to the Cloud SQL instance and the migration job can be safely deleted.\n\nThe following behaviors can occur during a promotion:\n\n\u003cbr /\u003e\n\n- When you promote migration jobs that have failed or were manually stopped during CDC phase, data on the source and the destination can be inconsistent.\n- Promotion enables [point-in-time recovery (PITR)](/sql/docs/mysql/backup-recovery/restore#tips-pitr) on migrated instances, which can take the promotion process longer to complete."]]