How to Migrate to Vultr Managed Databases

Updated on June 23, 2024
How to Migrate to Vultr Managed Databases header image

Introduction

Moving your databases to Vultr is a simple task with our managed migration systems. In this guide you'll find instructions to migrate to:

  • Vultr Managed Database for MySQL
  • Vultr Managed Database PostgreSQL
  • Vultr Managed Database for Caching

MySQL Migration

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. MySQL migration 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. 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

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.

MySQL Fallback Method

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 MySQL Migration

Make sure your target database cluster is large enough to accept the migrated data, then follow these steps.

  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: (optional) Enter a comma-separated list of databases to ignore, without spaces.
    • SSL Required: If your source database does not support SSL, turn this off.
  3. Click Test Connection.

  4. If successful, you'll see a message confirming that migration is ready and which type will be performed, 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.

PostgreSQL Migration

Vultr can migrate data from a publicly accessible PostgreSQL database with live replication. The migration process copies the data and schema with pg_dump if the source database doesn't permit replication.

How to Begin PostgreSQL Migration

Make sure your target database cluster is large enough to accept the migrated data, then follow these steps.

  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.
    • Username: Enter the username for the migration.
    • Password: Enter the migration user's password.
    • SSL Required: If your source database does not support SSL, turn this off.
  3. Click Test Connection.

  4. If successful, you'll see a message confirming that migration is ready and which type will be performed, 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.

Vultr Managed Database for Caching Migration

You can migrate from your DigitalOcean Managed Redis® database to your Vultr Managed Database for Caching using this tool. The Redis® database you are connecting to must be publicly accessible. If replication is not permitted on the source database, this tool will copy data and schema via SCAN. This migration tool only supports a single, one-time migration per subscription and continuous replication is not supported.

How to Begin Redis® Migration

Make sure your target database cluster is large enough to accept the migrated data, then follow these steps.

  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.
    • Username: Enter the username for the migration.
    • Password: Enter the migration user's password.
    • SSL Required: If your source database does not support SSL, turn this off.
  3. Click Test Connection.

  4. If successful, you'll see a message confirming that migration is ready and which type will be performed, 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 completed.