When migrating a database to Aiven, sometimes you may encounter errors like this:
"error": "Migration process failed",
STATUS METHOD ERROR
====== ====== ========================
done Migration process failed
In order to avoid these types of failures during the migration process we recommend that you run a check in advance.
Step 1: Create a task to perform the migration check
Here, we demonstrate a migration check from a MySQL DB to an Aiven service (project:
avn service task-create --operation migration_check --source-service-uri mysql://user:password@hostname:port/databasename --project example mysql
TASK_TYPE SUCCESS TASK_ID
===================== ======= ====================================
mysql_migration_check null e2df7736-66c5-4696-b6c9-d33a0fc4cbed
You can find more options available via the
-h menu, for example, to ignore certain databases for the check. Please note that filter databases are supported by MySQL only at the moment.
Step 2: Retrieve your task's status
Check the status of your task to see if it was successful or to show any error details:
avn service task-get --task-id e2df7736-66c5-4696-b6c9-d33a0fc4cbed --project example mysql
TASK_TYPE SUCCESS TASK_ID RESULT
===================== ======= ==================================== ====================================================================================
mysql_migration_check true e2df7736-66c5-4696-b6c9-d33a0fc4cbed All pre-checks passed successfully, preferred migration method will be [Replication]
Aiven REST API
The same checks can be performed via the REST API. The relevant endpoints are listed below:
More details can be found here:
If you have any questions, please feel free to reach out to our Support and let us know.