I often have to migrate between different Arch Linux systems. Some libraries have identical configurations, but different versions.

Concrete example: on OS A, I have MariaDB 14, with config files (/var/lib/mysql) that I want to migrate to OS B with MariaDB 15.

Is it more appropriate to :

  • copy the configuration files then install the library (with pacman in my case);
  • or install the library, and replace the configuration files after ? This question is not only reliable to MariaDB, but also to other programs like Sublime Text, Chromium, keepass, ...

When are the configuration files updated? When updating the library? When launching the library? Does this change from one program to another?

Thank you in advance for your answers


The configuration files for MariaDB are in /etc/my.cnf and/or /etc/mysql/my.cnf.

var/lib/mysql is the data directory. You cannot just migrate its contents over to the data directory of another version of MariaDB. You'll have to dump the databases from MariaDB 14 on OS A and then import the dump files into MariaDB 15 on OS B. The config files from OS B will take effect and you may need to change them to account for the databases that you are going to import.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.