CorvettePower.COM
4Nov/03

Moving to OpenSourceHost.com

I have now completed my move to open source host (OSH). The move took several hours because I backed up the databases and moved them over. Here are my notes.


Gallery


Backing this up was easy, you need to zip up the albums directory, and the two default style sheets in the gallery/css directory. Make sure the permissions are correct on the new albums directory, especially if you are switching versions.


Had to go in and run the configure.sh / secure.sh scripts to reset some things, specifically the border color (which is not in the CSS) and the admin password.


Drupal


This was a little trickier.
Exporting Backup


mysqldump --opt -u user_name -p database_name > tfiske_drupal.sql

mysqldump --opt -udrupaltfiske -pdrpwtfiske drupal_tfiske > drupal_tfiske-opt.sql


There is more but I need to get onto steve's box to confirm. The --opt flag is needed to make this an update script, rather than something that creates the database from scratch. Remove --opt if you are going to start with an empty database.


Import Restore


mysql -u user_name -p database_name < hacked.sql


Note that there is no password, the mysql utility asks for it. The hacked.sql script was modified from the export to drop 3 tables that the upgrade portion created.


Update


Modify the update.php file to allow it to be in update mode:


// Disable access checking?
$access_check = 0;


Change back to a 1 after you are done.


Then goto your site http://www.corvettepowr.com/update.php . Be sure to select the version your database _WAS_ on. Its very important to double check the date that it tells you since it most likely guessed wrong (read I spent alot of time wasted because the wrong date was chosen). This will go through and produce a report telling you how it altered your tables... this is where i figured out that I needed to drop some tables. If it doesn't work right, you just go back to the import/restore part and re-import.


Change update.php back to the 1, and your set. 🙂


Some Links


Forum on backups

MySQL site docs on backups

mysqldump docs

mysqladmin

Trackbacks are disabled.