Available in VPC
In Migration Management, you can create migration tasks to automate the step-by-step tasks required for migration. You can also check the status of migration tasks and restart, stop, complete, or delete them as needed.
Database migration proceeds through backup, restore, and data synchronization stages.
- Backup (Export): Backs up data from the source database.
- Recovery (Import): Recover data to the target database.
- Data synchronization (Replication): Synchronizes data between the source and target databases.
- After the recovery completes, the backup files are deleted.
- During MySQL database recovery, the target database retains binary logs for one day only to prevent increases in binary log size, and the default settings are applied after the restore completes.
- Database user accounts are not migrated. Create them directly on the target database. (See DB User management)
- Migration tasks run only for the list of databases that exist at the time of the connection test. Data consistency is not guaranteed for databases created after the connection test while the migration is in progress.
- At the Migration Completed stage (replication completed), you must click [Complete] in the console to finalize the database service migration.
Prepare for migration
Before creating a migration task and starting migration, complete the following items:
- Configure access to the source and target databases (see Configure access to the source and target databases).
- Create a source database endpoint (see Create an endpoint).
- Verify that the target database is running.
- If the source database uses procedure definer accounts, create accounts on the target database with the same ID and host (see DB User management).
- If you changed the source database configuration, apply the same changes to the target database (see DB Config management).
- If the target database contains databases with the same names as the source database, delete them from the target database.
Migration does not run if the target database contains databases with the same names as the source database. Delete the duplicate database names from the target database before proceeding.
Create a migration task
You can easily migrate data from the source database to the target database by creating a migration task.
- Complete the Prepare for migration before creating a migration task.
- Migration starts immediately after you create the migration task.
- Until the migration task completes or is deleted, you cannot operate the target database console or modify or insert data. (Data reads are allowed.)
- Migration runs without affecting the source database.
- While importing to the target database is in progress, additional backups on the target database are restricted.
To create a migration task:
-
In the VPC environment of the NAVER Cloud Platform console, navigate to
> Services > Database > Database Migration Service. -
Click the Migration Management menu.
-
Click [Create a migration task].
-
Enter the following information:
- Migration task name: Enter a name.
- Source DB: Select the source database identifier from the source database endpoint.
- [Edit an endpoint]: Click to modify the source database connection information configured for the endpoint (see Create Endpoint).
- Endpoint URL, DB PORT, DB User: Display the source database information configured for the endpoint when you select the Source DB .
- Target DB: Select the target database created on NAVER Cloud Platform.
-
Click [Test Connection] to test the connection between the source and target databases.
- If the test succeeds, the DB engine version and GTID MODE information are entered automatically.
- If an error occurs, a notification popup appears.
-
Enter the following information:
- Backup type: Select mysqldump or mydumper.
- Thread limit:
- If the backup type is mysqldump, the value is fixed at 1.
- If the backup type is mydumper, enter a value from 2 to 10.
(The maximum number of threads depends on the CPU and memory specifications of the target database server.)
- Target databases: Select 1 or more databases to migrate.
-
Click [Start migration task].
- The button becomes active after the connection test completes.
-
When the notification popup appears, click [OK].
- Migration starts.
- When you select mydumper, higher thread limits increase migration speed but also increase the load on the source and target databases. Set the thread limit with this consideration in mind.
- To use mydumper, we recommend creating a target database with at least 2 vCPUs and 8 GB of memory.
View migration job details
To view information about a migration job:
- In the VPC environment of the NAVER Cloud Platform console, navigate to
> Services > Database > Database Migration Service. - Click the Migration Management menu.
- In the task list, you can review the basic information, or click a specific task to view its detailed information.
- Basic information
- Task status: The current status of the task
- In progress: Migration is in progress.
- Abnormally terminated: Migration ended abnormally due to an error.
- Stopped: The job was forcibly stopped.
- Completed: The connection to the source database is fully disconnected, and you cannot restart or revert.
- Execution stage: Shows the current execution stage. Displayed only when the job status is in progress.
- Exporting: It is backing up data from the source database.
- Importing: It is recovering data to the target database.
- Replication: It is synchronizing data between the source and target databases.
- Source DB: It is the source database identifier you configured.
- Target DB: It is the target database name you configured.
- Start time: The time when the migration started
- End time: The end time if migration completed
- Elapsed time: If completed, shows the total migration duration. If in progress, shows the elapsed time since migration started.
- Migration size: It is the size of the source database backup files.
- Task status: The current status of the task
- Job details
- Source DB engine version: The DBMS type and version of the source database
- Target DB engine version: The DBMS type and version of the target database
- Migration start time: The time when the migration started
- Migration end time: The end time if migration completed
- Migration status: The current status of the task
- Target DB server name: The name of the target database server
- Execution stage: The status of each execution stage when the task status is in progress (Before, In progress, Completed, Error)
- Exporting: Backup progress for the source database
- Importing: Restore progress for the target database
- Replication: Data synchronization progress between the source and target databases
- If the status is Error, click View error to review the error details.
- Backup type: The backup tool type used for migration (mysqldump or mydumper)
- Thread count: The number of threads used for backup and restore
- Basic information
- If an error occurs during backup or recovery, address the issue and retry the migration.
- If replication fails, backup operations for the target database are restricted.
- If replication completes successfully, click [Complete] to make the target database available for service.
Restart Migration task
To restart a migration task that ended abnormally or was stopped:
- In the VPC environment of the NAVER Cloud Platform console, navigate to
> Services > Database > Database Migration Service. - Click the Migration Management menu.
- In the task list, select the task to restart and click [Restart].
- When the notification popup appears, click [OK].
- The task status changes to in progress.
- If the same error message appears after you address the cause and restart the migration, delete the migration task and create it again.
Stop a migration task
To stop a migration task in progress:
- If the task is in the backup or restore stage, the operation is canceled.
- You can restart the task after stopping it. (see Restart Migration task)
- If the task is stopped during backup: Backup of the source database starts again from the beginning when you restart the task
- If the task is stopped during recovery: When you restart the task, data recovery for the target database starts again from the beginning.
- In the VPC environment of the NAVER Cloud Platform console, navigate to
> Services > Database > Database Migration Service. - Click the Migration Management menu.
- In the task list, select the task to stop and click [Stop].
- When the notification popup appears, click [OK].
- The task status changes to stopped.
Complete a migration task
Ends data synchronization with the source database and makes the target database available for operation.
- This is available only when the Job status is In progress and the Execution stage is Replication completed.
- Completing the migration job may take several minutes.
- If you need to migrate again after completion, start again by creating a new migration job.
To complete a migration task:
- In the VPC environment of the NAVER Cloud Platform console, navigate to
> Services > Database > Database Migration Service. - Click the Migration Management menu.
- In the task list, select the task to complete and click [Complete].
- When the notification popup appears, click [OK].
Delete a migration task
You can delete migration job information. Deletion is available only when the job status is abnormally terminated, stopped, or completed.
- You cannot recover migration job information after deletion.
- You can view the source database information entered for the migration job in Endpoint Management.
To delete migration job information:
- In the VPC environment of the NAVER Cloud Platform console, navigate to
> Services > Database > Database Migration Service. - Click the Migration Management menu.
- Select the job to delete from the list and click [Delete].
- When the notification popup appears, click [OK].