I had to reset my dedicated server, so i backuped the whole /var/lib/mysql directory (stored in OVH Backup Storage).

Today on my clean dedicated, i reinstalled mariadb and so putted the whole /var/lib/mysql directory of the backup into /var/lib/mysql (the new). I just copied the databases directories (i also have other files like ibdata etc.).

But the MariaDB files don't load, so i tried running the following:

mysqlcheck -u root -p --auto-repair --all-databases

And i get tons of Table "..." doesn't exists, while i copied the database directory.

So i gave a run copying the ibdata file, and mariadb wasn't starting anymore.

Do anyone have a solution for copying my MariaDB databases?

I also chowned the directory


I see pretty much everywhere peoples talking about a .ibd file needed, while backuping that file wasn't displayed and not saved. As i said i use MariaDB and i also have an ibdata file.

  • Did you preserve owners and permissions while copying the files? Mar 19 '17 at 13:58
  • I also did chown -R mysql:mysql /var/lib/mysql
    – user406214
    Mar 19 '17 at 14:03
  • Edited adding more informations
    – user406214
    Mar 19 '17 at 16:49
  • Do you have the same configuration on old and new MySQL installation? Mar 19 '17 at 18:01
  • Yes, same password, user and etc.
    – user406214
    Mar 19 '17 at 18:14

Your Answer

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