- 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.
- Download mt-config.cgi file to analyze what is the current database.
- The current DB points to /home/wangjian/public_html/cgi-bin/mt/db
- This means, currently, it is using the BerkeleyDB, the plain text file.
- 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
- Determine to turn the BerkeleyDB into MySQL database
- The first thing to do is to backup the current Berkeley DB.
- Login into the /vdeck/
- Visit http://www.ipower.com/member/filemanager.bml?expand=/home/users/web/b2841/ipw.wangjian/public_html/cgi-bin
- Check /mt/ folder and click [Archive as Zip] button. Then wait for some time.
- The downloaded /mt/ folder archive is store at D:\my\8. Web\History and Backups\2007-12-23
- Test shows to delete a comment (even a single comment) on the old Berkeley DB base is not feasible. That takes too much time.
- The next step is to setup a new blog database, and try to import the exported entries into the new database.
- 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
- Create a new MySQL Database with the following spec:
- Database name: mtfanfan
- User name: public
- Password: *******
- Changed the mt-config.cgi to reflect the change in database.
- In mt-config.cgi, comment out the following line: # DataSource /home/wangjian/public_html/cgi-bin/mt/db
- In mt-config.cgi, added the following line:
- (For some reason, I used the old system user called wangjian_mtsys, and database is still wangjian_blog_2007)
- Now the login works. Then I will try to see if import works.
- Import the exported file.
- 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.
- Use the import tool to see if it works. I hope it works, but who knows.
- 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.
- 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