URGENT - Porteus RESCUE MySQL Backup
URGENT - Porteus RESCUE MySQL Backup
Hi. Im running a dedicated server with centos 5 64bit, and it got shutted down and it is not booting. I have mounted my disk but i don't know how can i get a backup of sql databases.
- fanthom
- Moderator Team
- Posts: 5622
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: URGENT - Porteus RESCUE MySQL Backup
not sure about CentOS but gentoo stores mysql db in /var/lib/mysql folder (if i'm not mistaken - played with mysql some time ago).
i would do a backup of whole /var folder so maybe you'll be able to read some log files and find the reason of the crash
i would do a backup of whole /var folder so maybe you'll be able to read some log files and find the reason of the crash

Please add [Solved] to your thread title if the solution was found.
Re: URGENT - Porteus RESCUE MySQL Backup
Yea, there are some files there but i need to take a backup of the database
- brokenman
- Site Admin
- Posts: 6104
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
- Contact:
Re: URGENT - Porteus RESCUE MySQL Backup
First thing is to create a non destructive image of the /var folder on a separate drive using something like partimage. Then you could attach the bad drive to anther centos machine and configure the sql database to point to the bad drive and do a mysqldump.
Personally i would wait for Hamza to answer this one .... he has learned alot about database problems.
Personally i would wait for Hamza to answer this one .... he has learned alot about database problems.

How do i become super user?
Wear your underpants on the outside and put on a cape.
Wear your underpants on the outside and put on a cape.
Re: URGENT - Porteus RESCUE MySQL Backup
It is very difficult as the database are stored as binary file into /var. The thing you need to do is to make a snapshot of files present on /var and try to go in /var/lib/mysql. This folder should contains some binaries files which it contains also your database data. If you want really to restore your databases data.
After be in /var/lib/mysql. You should find out a folder named data and another one inside it named like your old database name.
The easy method would be to use brokenman's method.
The database files are there : /var/lib/mysql/data/your_database
What is your type of table ? InnoDB, MyISAM, etc ??
A method on fly :
After be in /var/lib/mysql. You should find out a folder named data and another one inside it named like your old database name.
The easy method would be to use brokenman's method.
The database files are there : /var/lib/mysql/data/your_database
What is your type of table ? InnoDB, MyISAM, etc ??
A method on fly :
- Install centOS on new server
- Copy/mount your old var folder on new server as /var
- Open a terminal and run mysqldump your_database
NjVFQzY2Rg==