Wednesday, August 30, 2006

At last! The migration of AK

the weeks of distress will finally over.

It began with the migration of AjangKita to new server but still in the hand of Master Web (MWN). Instead of solving problem, it created new problems. One of the example was, the new server suddenly down and displayed the message "Sorry.. the server is in maintenace" while it didn't.

I urged the owner to ask MWN what condition which would present the error message. Unfortunately, they gave unsatisfied answer. Hence, the owner got angry and decided not to prolonged the contract and move to other provider.

When we planned the migration, we found the "Sorry" error message was created by the script which were not part of site and neither me, the owner, or Rully created it. Hence, we concluded it was part of the server. How could MWN did not answer us when we asked them about "Sorry..." messages?

Back to topic.
This is my first project of moving website. The administrators (Rully, the owner, and I) had no experience at all.

The first problem was backing up the database. We found two options, using phpMyAdmin or using mysqldump.

Alas! using phpMyAdmin was too slow and the phpMyAdmin given from MWN didn't work properly so I had to upload another phpMyAdmin. Even when my phpMyAdmin worked, it only dump a third of the database.

We were succeedly backed the database up using mysqldump. However, we weren't sured because the file was less than it should be (based on the cpanel given by MWN). The owner would not paid the money to the new provider if we hadn't made sure we had the fully backup of database yet. Hence, I downloaded the sql file and tried it in my own computer and it worked!

The second problem was moving the data to the new server. Theoretically, it should be simple:

mysql -u username -ppassword < nameOfFile.sql

However, the real word was more complicated than it appeared. The new server gave us less freedom in creating username for mysql. We created the username if we created a new database. And alas! The new username could not created new databases, so we had to used the available database (which created in the same time when we created the user). So we had to edit our sqlfile, removing the line "CREATE DATABASE `yadayadayada`".

The problem was, we couldn't edit the file on the server because quota problem (we used vi) and hence we had to edited the file in other computers. While Rully edited in his server, I edited the file in the old server. I had to admit, the old server gave us more freedom in shell mode.

We used Rully's file first. Unfortunately, the file was corrupted. Rully had problem with his connection. His IP address was changed very often. I wasn't sure whether the problem contributed to corrupt the file but, nevertheless, the file from Rully's was useless. Hence we should use the file from old server.

Thanks God!
It worked...
and the rest was easy...

Of course our new server had to be tested.
At least, the what-the-heck-is-this-alien-language which appeared when the moderator ban a member does not appear again. Or will she?

the administrator of
Kunderemp Ratnawati Hardjito a.k.a
Narpati Wisjnu Ari Pradana