Hello, i have a problem. I backup from of my old server data, www and databases. But i did mistakes and databases i dont export in .sql, but I download complete folder of /var/lib/mysql/name_of_db - There are ibd and frm files. On new server, i created database in ispconfig, after that i take this all files and upload it to /var/lib/mysql/name_of_new_db. But I guess it was mistake. Because right now I can see tables in database, but i can see there just that table is running, no type, no values, only in two is InnoDB, but this table is empty too. Is here any way how to solve it? Because i found that i should for example move log files fom var/mysql/ after i stop mariadb services, but does not work. I tried to reconfigure ispconfig services, restart mariadb etc. Thank you.
Hello, at all, from my old server I have complete content of /var/lib/mysql/ with all databases and files. Maybe If i remove this content and upload files from old servery should be working? But not sure, because in case you upload here, is created new databases, but i think that this is a problem - this database will be not created via ispconfig and there will not be a user - i should use root.
So old server does not exist anymore to get database dump? I think just copying the database file to new server does not work, database is not created that way. Dump would be easy to move to another server. I suppose it may be possible to create the database and use the copied database files to insert the contents, but it would need to be created with exact same parameters and settings for copied content to work. And I do not know how to do this kind of database move and creation.
Yes, exactly, old server does not exist. One things what I have now is only content of mysql databases in /var/lib/mysql/. I know that the easiest way is do export via console or phpmyadmin and import to new database, but in this case this way was not possible.
Set up a new server (or virtual machine) where you just install the same mysql or mariadb version that the original server had, there you restore the database data you have, and then you can export the databases using mysqldump.
Thank you! Both servers had the same version of Debian, ispconfig etc., so this is should not be a problem. At all, both servers was concifugred by your manual perfect server step by step. I tried to upload files to new server and hope that via command I could dump database to .sql and after that import for example via phpmyadmin, but does not work. I tried to remove completely content of /var/lib/mysql/ and import there all files from old server and set permission for theese files for mysql, but does not work well - after this mariadb is down. I am not sure, but I think that is not good idea to do changes in ispconfig and in files of server. Most probably all this operation should be only via ispconfig. What i found, that i have to upload ibddat1 file etc. too. I found online tools which can you use to repair database - in this case frm and idb files convert to one sql file, but only paid.
Is mysql version also different? You could install a temporary host, where you install exact same version of database application you had on old host, and then try copying the database. But I do not know what exactly must be done to make copied database file work. If this works you can dump the database and use dump on the host where you want to use it.
Thank you, I will try it and we will see. Yes, mysql version/mariadb is same. In case I found how to do this, I will post solution here.