The UBP forum recently has been compromised causing some database issues. It was a good thing I have a backup of the forum (database and files) which is about 2-3 weeks old as I was only doing a backup at least once every two (2) weeks.
The forum has been using SMF 1.1.15 for a long time now and has not been upgraded to SMF 2.0 despite the later being stable for quite sometime now. The reason for the upgrade delay was due to the heavy forum activity. Lately, it has clocked “896199 Posts in 17635 Topics by 12816 Members“.
With the maintenance and restoration happening on the UBP forum, I decided to finally upgrade to the latest SMF 2.0. Despite an automated upgrade, the process was very challenging.
I need to restore the missing database tables from the backup first. I want the the forum to be working on its original SMF 1.1.15 form first before trying to upgrade it to the newer SMF 2.0 version.
The files in zipped format is about 168 MB. The database size is 450 MB. I tried upgrading it directly online but I always get some errors, either a database problem or a missing file on the upgrade package. It took me several attempts before I finally decided to just do the upgrade offline. It is still not an easy task though.
With the size of the forum database, using phpmyadmin is near impossible due to limitation of PHP uploading. I just decided to use MySQL directly using:
To dump the database into SQL format, I use the command:
root# mysqldump -u user -ppasswd database > database.sql
To restore the database, I use the following command:
root# mysql -u user -ppasswd database < database.sql
Regardless of operating system being used, it is just the path that will be changing.
In the former, dumping the database took about almost 5 minutes. It takes similar duration for restoring it back into mysql.
That is just the first step of the upgrade. The actual upgrade using the “SMF large upgrade package“, took about 1-1/2 hours with the most common error as script not responding for more that 30 seconds.
The first time I got this error, I just waited for it to be completed but the process just went in circles. I tried helping it by optimizing the database using phpmyadmin. It worked, the process continued to the next step.
It was a relief when finally I got 100% complete for the upgrade.
The next challenge was to restore some packages such as Ads Management and SPAM protection but that was the easy part of it.