If it can fuck up, it eventually will

Well the webserver my site was hosted on decided to give up, and my sites been traffered over to a new box.


The good thing is this box is actually faster, and the site seem to load faster, the only thing is im viewing this by a modified hosts file as the new address hasn't propergated to my isp yet.


Still I learnt some new things, often wondered why unix used .tar.gz instead of just .zip. Turns out the gz bit is just the compression, but its only able to handle one file, so thats where tar'ing comes in. It makes lots of files, one file, and comes with some handy options like preserving file permissions.


Also learnt more about exporting and importing mysql from the shell. This is plagued with problems, which is why so many sites tell you how to do it with utilities.


mysqldump -uUser -p -A > file.sql seems like a simple option to export all your databases in one go, however you need to start up sql in a special mode to re-import it again, and thats still hit and miss. You cant use mysqlimport on it either since that requires you to specify a database, and -A doesn't just contain one.


mysqldump -uUser -p Database > db.sql seems like an easy option, however you need to know all the names of the db's and repeat for each one. To top it off, if you want to re-import this via phpMyAdmin, you have to edit the file and remove the top dump comments or it just wont work.


So sql users beware, make sure you have planned and tested your recovery options before the shit hits the fan.

FOOTER TO GO HERE!