Innobackupex copy back worked - MySQL wont start... HELP!

Done a few hotbackups and prepares. Now trying to do a full disaster recovery. I have two Centos servers both running an open source application called Alfresco.

The MySQL database is held in the /opt/alfresco-3.4.d/mysql/data directory.

The MySQL database is started and stopped by the Alfresco system starting and stopping.

I’ve managed to backup and prepare the data files on the live server using the innobackupex script.

I then used the copyback script to copy the data onto the blank server so that I could start the server and see if the backups worked… e.g. a replica of the master server.

The copyback script worked fine buth when trying to startup the MySQL database I get an error as if the database is stuck.

I renamed the old data directory before bringing in the restore data with the copy-back script. If i replace the contents of the data folder with the previous contents the database starts up fine.

I think its something to do with permissions of when the database makes the backup or something to do with the copied files when but into the data directory they can’t start up or just something simple.

I’ve included some screen shots with the initial error and of the mysqld log file with errors on startup.

Any pointers?

Think I solved it. When the copy-back script runs it strips out the ownership details for the mysql database. after running a chown -R statement into the mysql data folder the servicees could be started and the MySQL database came back online.

However… I then added content to the replica server and tried to run the script on this server to try replication the other way and when starting the innobackupex script I get the following error:

Error: mysql child process has died: ERROR 2002 (HY000): Cant connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2).

This is probably due to the MySQL socket being in another location at ‘/opt/alfresco-3.4.d/mysql/data’

I’ll carry on tinkering…

Bump… Anyone?