Lift and Shift to MariaDB SkySQL

Database professionals will often groan when someone utters the word migration – it can be complex to move a database from one platform to another. There is one type of migration that need not cause consternation – the “lift and shift”. Lift and shift migrates an application or operation from one environment to another without the need to redesign the application or change operations workflow. Migrating from an on-prem MariaDB Server deployment to MariaDB SkySQL is a lift and shift, so is migrating from Amazon RDS for MariaDB or from Microsoft Azure for MariaDB to MariaDB SkySQL. No material application or data changes are required.

I have read that lifting and shifting can be compared to moving a houseplant from one location to another; being in a different habitat will be a factor in whether the plant will thrive. With any migration, including a lift and shift, it’s important to evaluate and assess your environment thoroughly before implementing to ensure your “plant” thrives. That’s why we’ve written a Lift and Shift Migration Guide and I’m giving a Practical Guide for Data Migration to the Cloud webinar (which you can register to watch live on September 17 or recorded after that).

Evaluate: What Benefits Will be Gained?

No migration is ever undertaken lightly and there must be obvious benefits to justify the overhead. The benefits of migrating to MariaDB SkySQL depend on the situation and/or environment you’re migrating from. If you are migrating to MariaDB SkySQL from another hosted cloud database service such as Amazon RDS, or Microsoft Azure, you’re moving from what is usually an older version of MariaDB Community Server to the most recent version of MariaDB Enterprise Server. This gains you the newest enterprise features and supportability.

If you are moving from on-prem to MariaDB in the cloud, you get all the benefits people expect from migrating to the cloud like fully managed infrastructure, usage-based pricing, on demand services with no capital outlay, and flexible deployments, in addition to MariaDB specific features.

In addition, with MariaDB SkySQL you also gain access to a whole slew of subject matter experts on the SkySQL team. Standard support is included with all SkySQL services and includes monitoring, operation of nightly automated backups, and technical support. SkyDBA is an additional level of support with a team of certified DBAs like myself who have years of expertise working on MariaDB and are always available to answer questions or perform complex operations. We even assist with migrations. The benefits of having an expert support team cannot be overlooked.

Assess: Current and Future Needs

Before you start any migration there are several considerations that should be examined. First you want to take into account your current and anticipated database needs. This will help you to determine the specifics of your deployment. Do you need a single instance for a small application or a large Primary/Replica setup that provides multiple read-replicas and automated HA failover and recovery? What type of workload do you currently have and could you benefit from any of the additional technologies and topologies available?

Flexibility is where the cloud in general and SkySQL in particular provide one of its major benefits. If you are unsure about the size of instance you need, it’s extremely easy with a DBaaS to deploy new instances and topologies on-demand or expand existing ones. It is also easy to try different topologies to meet specific workload needs. SkySQL offers technology to support a multitude of workloads: transactional (both standalone and Primary/Replica), analytical, hybrid transactional and analytical (HTAP), and scale-out distributed workloads.

Implement: Plan, Deploy, Test

Once you have decided on the environment and topologies you will use, it’s time to get started.

  1. Plan – Even for lift and shift migrations, a good migration plan will reduce confusion and provide clear direction. Depending on the scale of the migration, I will often make two plans, an operational overview with the general steps and outline of the plan, and then a detailed technical plan that includes the specific commands to run, so there are no mistakes during the live operation.
  2. Deploy database services – Sign up for a SkySQL account and launch your chosen service or services.
  3. Import data – The appropriate method will depend on if you are migrating a transactional or analytical database. Help is always available from SkySQL support.
    1. For transactional services, logical backup tools such as mariadb-dump and mysqldump can be used to produce a data dump, which is then loaded to the SkySQL service.
    2. For analytical services, data in TSV (tab-delimited) or CSV (comma-delimited) format can be imported into the SkySQL service using LOAD DATA LOCAL INFILE, which is optimized behind the scenes to leverage cpimport for rapid loading.
  4. Keep data updated after initial import – If deploying a Primary/Replica transactional service, you can work with SkySQL Support to deploy replication from your source database to your SkySQL service.
  5. Testing – One of the steps most critical to your success is testing. The specific testing to perform for migration may differ from your organization’s typical application or system-level tests. A mix of manual testing and automated script-driven testing should be applied. Automated testing allows for more repeatable testing at scale. Compare test results with checksums, counts, smoke tests, randomized reads, writes and stored code calls.
  6. Application cutover – Application cutover should occur on a scheduled basis after testing has successfully concluded and during a scheduled maintenance window. Because a lift and shift strategy has been chosen, simply repointing the application to the SkySQL service is all that should be required to cutover.
  7. Clean up – After running on SkySQL for some defined period of time, typically weeks, decommission the old database.

Speaking as a Support Engineer, there is no such thing as a completely painless migration, but a lift and shift from one MariaDB installation to MariaDB SkySQL in the cloud is as close as it comes.

For More Information