Table of Contents
Was this article helpful?
Try Vultr Today with

$50 Free on Us!

Want to contribute?

You could earn up to $600 by adding new articles.

Managed Database Migration

Last Updated: Mon, Jul 18, 2022


Moving your databases to Vultr is a simple task with our managed migration system. You can migrate any existing MySQL database to a Vultr managed database, as long as the database you are migrating is publicly accessible over the internet. Vultr's database migration process uses live replication if your database meets all the requirements, or it falls back to offline backup and restore with mysqldump if live replication isn't possible.

Live Replication

Vultr can do live replication of any source MySQL database if it meets the following requirements:

  • The database should be version 5.7 or greater
  • The database must use the InnoDB storage engine
  • gtid_mode must be ON
  • The master user for replication management is specified via TARGET_MASTER_SERVICE_URI
  • The user on the source database has enough permissions to create a replication user
  • The server_id on the source, and the target does not overlap

Vultr's MySQL managed databases meet all these requirements, and it's possible to use live replication to migrate a Vultr managed database cluster to a new Vultr location.

Live replication performs a one-way sync from your source database to the target. After the initial synchronization, the replication process continues to monitor the source and replays any changes to the target until you manually stop the replication. While replication is in progress, you should treat the target cluster as a read-only copy.

Offline Backup and Restore

If your source database doesn't meet the requirements for live replication, migration will fall back to offline backup and restore with mysqldump. This is a one-time backup and restore; you should ensure the source database is consistent before you begin.

The migration process runs these steps:

  • Log in to the source database
  • Back up the data and schema with mysqldump.
  • Restore the schema and data to a new database in the target cluster.

How to Begin a Migration

  1. Navigate to the Migration tab of the Target managed database.
  2. Complete the following important information.

    • Hostname: Enter the hostname of the Source database. This can also be an IP address.
    • Port: Enter the MySQL port of the source database.
    • Database Name: Enter a database name used to verify the connection. All databases on the server will be migrated unless listed in Ignored Databases below.
    • Username: Enter the username for the migration.
    • Password: Enter the migration user's password
    • Ignored Databases (Comma-Separated): (optional) Enter a comma-separated list of databases to ignore, without spaces.
    • SSL Required: On is recommended by default. If your source database does not support SSL, turn this off.

    Make sure your target database cluster is large enough to accept the migrated data. See the screenshot below for reference:

    Managed Database Replication Form

  3. Click Test Connection.

  4. If successful, you'll see a message confirming that migration is ready, and which type will be performed, either replication or mysqldump. For example, you may see a message like this:

    Connection successful! Ready to migrate via replication method.
  5. If the test succeeds, click the Begin Migration button to proceed.

  6. The status changes to Migration Pending.
  7. When the migration completes, the message changes to "Migration Complete (replication)" and a Detach Replication button appears.

You should detach replication when you are ready to finish the migration.

Replication means that the database migration is ongoing, and any new data in the source database will continue to be copied to the target database until you detach the replication. Replication is one-way: data is replicated from the source to the target. You should not add or update data in the target until after you detach the live replication.

Want to contribute?

You could earn up to $600 by adding new articles.