Virtualmin hacked, need help in restoring database

My VPS was hacked last night and I lost everything.

Now VPS host has given backup of my whole OS files. My OS was centOS.

Can anyone help me or at least tell me from where I can find database files, I want to restore all database from the backup.


OS type and version REQUIRED
Webmin version REQUIRED
Virtualmin version REQUIRED
Related packages SUGGESTED

See Database restore does not work from Virtualmin backup - #2 by calport

We are here to help, feel free to ask questions. If you have a recent backup, your server should be back online quite quickly.

I can see frm and idb files in MySQL folders but unable to recover them.

I tried few software like staller, these tools are showing structure of the table but unable to show the data of the table.

When I put these frn and idb files in new instance of virtualmin, it shows table size increased but don’t show data. Further error shows that table doesn’t exist while I am able to click on the table.

Please help.

You’ve got innodb databases which won’t just magically work. Make sure you have everything in /var/lib/mysql:
mysql (directory with .frm and .idb files)
databasedirs (directories with .frm and .idb files)

In /etc/my.cnf add the following:

then try starting mysql and see if you can see your databases and their contents. You’ll need to confirm that the files all have the correct ownership (mysql.mysql) and that the directories have the correct permissions.

Good luck, and if I can help let me know.

1 Like

Did you shutdown MySQL first. You may have to chown the copied files like so: sudo chown -R mysql:mysql /var/lib/mysql.

Copy database in your database folder (in linux, the default location is /var/lib/mysql). Keep same name of the database, and same name of database in mysql mode.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.