Question

I've had a server that is not booting up, it had mysql 5.5.24. I was able to copy the whole /data directory.

I will be temporarily using an older backup server that has mysql 5.1.36 and cannot be upgraded due to NET framework issues.

I was wondering if I could just overwrite the /data directory to have the database running?

I ask this because I usually use mysqldump to backup and restore, which as I understand backups by generating sql instructions and rebuilds the database by running such queries.

To me it seems logical to just replace the raw data and have the database working as expected. But I'm worried something might break considering im going back to an older version. Which could teoretically be unable to interpret a newly implemented way to store the raw data.

Update: The database seems to be running fine with the overwritten raw data. If anyone knows of a possible problem please let me know.

Was it helpful?

Solution

A backup is just a boat anchor until you verify that you can reload from it. So, give it a try. Set up a 5.5 version (if you can find such an old version) and try the dump.

It may work as is.

How are you doing the backup? mysqldump? If so...

At worst, you might need to edit the dump file to fix some old syntax. (I don't remember any from 5.1 to 5.5. Before that, there was TYPE=InnoDB changing to ENGINE=InnoDB.)

If you are copying a directory tree, then "files are files"; there is the backup is just a filesystem; it does not care what the bits mean.

So, I am puzzled as to why you talk about "5.1", yet you talk about "/data".

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top