Migrate MariaDB from Synology NAS to homelab server (docker mariaDB)

Hi

I’ve been running my MariaDB server on my Synology NAS (DS212j) which has worked fine for the past few years. However recently a notification is shown in Home Assistant with a suggestion to upgrade the MariaDB server to 10.5.17 or later to resolve a significant performance issue.

My assumption:

  1. Create docker container with MariaDB, configure database name + user and grant access
  2. Login to Synology NAS MariaDB (phpmyadmin) and create export of all databases
  3. Login to docker MariaDB and import all databases
  4. Update MariaDB configuration in HA and restart

Is it as simple as that?
Most data is of no importance to me except for the historic solar information. Do I need to stop the recorder first from writing to the current database or not? I assume I obviously lose information between the export + import & configuration switch, but that would (hopefully) be minimal.

I haven’t noticed anything of the performance issues but the warning is bothering me :sweat_smile:

I did similar migration from official Synology package to docker image on my Synology NAS. In fact I used HeidiSQL tool to perform migration and it even did not required to create a new DB in docker, everything was handled by the tool. It was sort of life migration (old DB directly to new DB) skipping the export and then import process. This way it was somehow faster, as whole proces can take hours (depending obviously of amount of stored data. My DB is ~4.5GB in size and it took ~3 hours to migrate. Export/Import would be twice as long. So for data consistency I keps HA stopped during that time to avoid data being written to various tables while migrating. Perhaps thete is some tool (even HeidiSQL) that would allow to sync data after initial migration, but I did not investigated such option.

1 Like