Trying upgrade from v1.12.2 to v4, let me do a record
-
Migrate nodebb to a new machine
from to OS Ubuntu 22.04.5 LTS Debian 12 nvm version 12 20 mongodb version 6 8 nodebb version v1.12.2 v4.2.1 -
-
Step 1 database
The target machine has MongoDB 7 installed, not 8. To ensure no data errors occur, I will upgrade to version 8 later
First, dump database and restore
mongodump -u nodebb -p password -d nodebb -o database
mongorestore -d nodebb nodebb/ -v
Step 2 upgrade nodebb
-
Force git to use HTTPS. This problem cost me hours trying to find a solution. https://stackoverflow.com/a/72391698
git config --global url."https://github".insteadOf git://github
-
v1.12.2 -> v1.13.x/v1.14.x/v1.15.x failed
nvm version 12, error on ./nodebb upgrade. The errors I'm seeing looks like compatibility issue between benchpress and Node.js version 12. -
v1.12.2 -> v1.16.x success
nvm switch to 14, some error on ./nodebb upgrade. The upgrade process had some errors, but the outcome wasn't impacted. Once completed, ./nodebb dev works. -
v1.16.x -> v1.17.x -> v1.18.x -> v1.19.x success
-
v1.19.x -> v2.x success
-
v2.x -> v3.x failed
-
v2.x -> v3.0.1 success
some error on ./nodebb upgrade. The upgrade process had some errors, but the outcome wasn't impacted. Once completed, ./nodebb dev works. -
v3.0.1 -> v3.x doing
nvm switch to 18.
-
-
Some plugins installed through the old ACP are no longer on the whitelist in the new ACP due to being outdated, making them impossible to uninstall using the new ACP panel. However, while npm uninstall works, they reappear after a reset (could it be that the plugin list is being read from the database?)
My next step is to try and reproduce the previous actions, but in a more condensed way to test the minimum upgrade steps. -
Step 1 preset
git config --global url."https://github".insteadOf git://github
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
Step 2 database
-
Based on my testing, the main source of upgrade errors appears to be certain outdated plugins. The recommended procedure is to uninstall them via the ACP panel prior to upgrading, then manually uninstall them again with npm in the NodeBB directory and remove their folders from node_modules, and only then perform the upgrade.