1. FTP to the server and check /cgi-bin/mt/mt.cgi folder. It is a new installation with MovableType 3.2. That was created on Jan 14, 2007.
  2. Download mt-config.cgi file to analyze what is the current database.
    1. The current DB points to /home/wangjian/public_html/cgi-bin/mt/db
    2. This means, currently, it is using the BerkeleyDB, the plain text file.
    3. BerkeleyDB is the problem of Wendy’s blog – when there are too many comments, most of them are spams, it does not support and caused many problem
  3. Determine to turn the BerkeleyDB into MySQL database
  4. The first thing to do is to backup the current Berkeley DB.
    1. Login into the /vdeck/
    2. Visit http://www.ipower.com/member/filemanager.bml?expand=/home/users/web/b2841/ipw.wangjian/public_html/cgi-bin
    3. Check /mt/ folder and click [Archive as Zip] button. Then wait for some time.
    4. The downloaded /mt/ folder archive is store at D:\my\8. Web\History and Backups\2007-12-23
  5. Test shows to delete a comment (even a single comment) on the old Berkeley DB base is not feasible. That takes too much time.
  6. The next step is to setup a new blog database, and try to import the exported entries into the new database.
    1. Export the old Fanfan’s Blog. The exported file is stored at D:\my\8. Web\History and Backups\2007-12-23\fanfan_export_original.txt
    2. Create a new MySQL Database with the following spec:
      1. Database name: mtfanfan
      2. User name: public
      3. Password: *******
    3. Changed the mt-config.cgi to reflect the change in database.
      1. In mt-config.cgi, comment out the following line: # DataSource  /home/wangjian/public_html/cgi-bin/mt/db
      2. In mt-config.cgi, added the following line:
        ObjectDriver DBI::mysql
        Database mtfanfan
        DBUser public
        DBPassword ******
        DBHost localhost
      3. (For some reason, I used the old system user called wangjian_mtsys, and database is still wangjian_blog_2007)
      4. Now the login works. Then I will try to see  if import works.
    4. Import the exported file.
      1. Upload D:\my\8. Web\History and Backups\2007-12-23\fanfan_export_original.txt to /cgi-bin/mt/import/ folder. This takes some time.
      2. Use the import tool to see if it works. I hope it works, but who knows.
    5. If it works, the next step is to delete those spams. This takes some time, but since it is MySQL database, it should be much quicker. Or even use the database tool itself helps. – it turned out it worked.
    6. There is something so unexpected – the new iPowerweb architect moves the database, their database and files are no longer on one server. Instead, they have the shared service servers. That creates a very interesting scenario: there are two database on two servers with exactly the same information, one is on localhost, the other is on the shared server. The problem is,  the MovableType scripts connects to the local server while the phpMyAdmin connects to the shared server. Well. Everytime I have to talk with ipower, I feel very very frustrated.

P.S. The note is on http://home.wangjianshuo.com/archives/20071202_recovery_of_fanfans_blog.htm