[SOLVED] Upgrading NodeBB 0.6.0 to 0.7.0+
-
@WildPointer said:
No worries but before I start diving into the coding I have to make sure that someone has successfully upgraded the "0.6.0" to a 0.7.x tree.
Also I feel like this part of wiki is written in Weirdish rathar than simple English:NodeBB’s upgrade path is designed so that upgrading between versions is straightforward. NodeBB will provide upgrade compatibility (via the --upgrade flag) between the latest version of a lower branch and the latest version of the higher branch. For example, if v0.2.2 is the latest version in the v0.2.x branch, you can switch to the v0.3.x branch and suffer no ill effects. Upgrading from v0.2.0 to v0.3.x is not supported, and NodeBB will warn you when attempting to upgrade that you are not upgrading cleanly.
So according to that, "Upgrading from v0.2.0 to v0.3.x is not supported" and it means "You can't upgrade your v.0.6.0 to v0.7.x".
if yes, why the upgrade was 100% fine except updating the database schema, and if no, what's the point of "For example, if v0.2.2 is the latest version in the v0.2.x branch, you can switch to the v0.3.x branch and suffer no ill effects." ?
Now I'm just stuck in v0.6.0 and can't really do anything with my current installation.i'm in the same situation, trying to upgrade to v0.7
I will tell you if it's successful
-
So you mean you've got a problem with "old database schema" as well?
-
@WildPointer said:
So you mean you've got a problem with "old database schema" as well?
Yeah.
First i've installed redis 3.0
apt-get install software-properties-common add-apt-repository ppa:chris-lea/redis-server apt-get update apt-get install redis-server
But there is still a pb with database
15/6 15:58 [3067] - error: [upgrade] NodeBB upgrade could not complete, as your database schema is too far out of date.
15/6 15:58 [3067] - error: [upgrade] Please ensure that you did not skip any minor version upgrades.
15/6 15:58 [3067] - error: [upgrade] (e.g. v0.1.x directly to v0.3.x) -
yeah, sure!
I've installed the redis from the chris' PPA repo but it didn't help me either.(just got rid of "your redis server is too old etc."That pastebin link is my terminal history. I think by far we've done the same things and now I'm sure it's not just me who got into this problem.
Personally I'm a shrimp in node.js' world and all I can do is waiting for someone with more experience to do some magic on it.
-
now it's working and i can't really figure why ^^
I tried checkout tags,
git checkout tags/v0.6.1
andgit checkout tags/v0.7.0
and./nodebb upgrade
for each one, and it seems it worked after that ... -
@ffmad hmm, I've tried the following but it didn't work:
$ git checkout tags/v0.6.1 error: pathspec 'tags/v0.6.1' did not match any file(s) known to git. $ git checkout v0.6.1 error: pathspec 'v0.6.1' did not match any file(s) known to git. $ git checkout tags/v0.7.0 error: pathspec 'tags/v0.7.0' did not match any file(s) known to git. $ git checkout v0.7.0 error: pathspec 'v0.7.0' did not match any file(s) known to git.
maybe I'm doing something wrong?
-
have you done a git fetch before ?
-
@ffmad my bad about
git fetch
but after doing it the way that you said, I just got an absolutely empty board! not even basic example posts there! -
@ffmad yeah, the DB is just fine and when I start another nodejs stance(yet another directory which is v.0.6.0) it's okay.
Also I'm wondering how the upgrade process was success on the DB!16/6 13:49 [2972] - info: NodeBB v0.7.0 Copyright (C) 2013-2014 NodeBB Inc. 16/6 13:49 [2972] - info: This program comes with ABSOLUTELY NO WARRANTY. 16/6 13:49 [2972] - info: This is free software, and you are welcome to redistribute it under certain conditions. 16/6 13:49 [2972] - info: Warning: Redis server does not require a password, but a password was supplied. Warning: Redis server does not require a password, but a password was supplied. Warning: Redis server does not require a password, but a password was supplied. 16/6 13:49 [2972] - info: Beginning database schema update 16/6 13:49 [2972] - info: [2015/02/08] Clearing reset tokens 16/6 13:49 [2972] - info: [2015/02/08] Clearing reset tokens done 16/6 13:49 [2972] - info: [2015/02/17] renaming home.tpl to categories.tpl 16/6 13:49 [2972] - info: [2015/02/17] renaming home.tpl to categories.tpl done 16/6 13:49 [2972] - info: [2015/2/23] Activating NodeBB Essential Rewards 16/6 13:49 [2972] - info: [2015/02/24] Upgrading plugins:active to sorted set 16/6 13:49 [2972] - info: [2015/02/24] Upgrading plugins:active to sorted set done 16/6 13:49 [2972] - info: [2015/02/24] Upgrading privilege groups to system groups 16/6 13:49 [2972] - info: [2015/02/24] Upgrading privilege groups to system groups done 16/6 13:49 [2972] - info: [2015/02/25] Upgrading menu items to dynamic navigation system 16/6 13:49 [2972] - info: [2015/02/25] Upgrading menu items to dynamic navigation system done 16/6 13:49 [2972] - info: [2015/05/07] Upgrading uid mappings to sorted set 16/6 13:49 [2972] - info: [2015/05/07] Upgrading uid mappings to sorted set done 16/6 13:49 [2972] - info: [2015/05/08] Fixing emails 16/6 13:49 [2972] - info: [2015/05/08] Fixing emails done 16/6 13:49 [2972] - info: [2015/05/11] Updating widgets to tjs 0.2x 16/6 13:49 [2972] - info: [2015/05/11] Updating widgets to tjs 0.2x done 16/6 13:49 [2972] - info: [2015/05/20] Adding username:sorted and email:sorted 16/6 13:49 [2972] - info: [2015/05/20] Added username:sorted and email:sorted 16/6 13:49 [2972] - info: [upgrade] Schema update complete!
-
I think now it's time to /BUMP
-
I think I should ask my question in another way:
"Is there anybody out there who has successfully upgraded 0.6.0 to 0.7.0+ ?"
I'm just stuck in this version and can't do anything right now, except creating a new website from scratch and saying a big FU to all users and their posts and reputation!
Perhaps someone is interested in this problem?
I know it's a "community-driven" project and I ain't got no premium subscription or something, but seriously guys, isn't 15 day enough for getting at least a "dude, it's your problem! I've upgraded my forum and it's working."? -
Hey @WildPointer, are you updating this right in your production instance or are you using a dev instance to test it first?
I don't have anything in production yet, but I've been staying on master. In regards to your conflicts though, that happens if I (or some other process) added or modified something in the directory tree.
A git checkout should be sufficient, but then you'd have to make a backup of your db and then call
./nodebb upgrade
to update your db to the new schema if neededI just tried to reproduce what you're trying to do, so here's what I did:
git checkout tags/v0.6.0
... boot up, add some groups, users, and posts, shut down ...
git checkout tags/v0.7.0
./nodebb upgrade
^ at this point, there was a db schema conflict and I couldn't upgrade, so I did:
git checkout tags/v0.6.1
./nodebb upgrade
.. boot up and check everything is fine ...
then, I could do
git checkout tags/v0.7.0
./nodebb upgrade
... boot up and verify upgrade.just make sure you have backups! It's not version 1.0.0 yet so be vigilant about those things. I know I'm not as good at that as I should be
-
@BDHarrington7 Thanks for your reply.
I have two VMs, one of them is production and another one is for test/experiment and the source code is 100% identical between these two machines.(even though once I tried it on production server to make sure it's not sync/copy problem between two machines.)
Actually I've tried many different methods and my forum is just a vanilla one without any modification(except favicon) so I think it's not normal to have conflict with 12-20 files only in the base code.
I'm not sure but I think I've tried this method(the last time) and everything went smoothly until I opened my forum and saw absolutely no content! Only the top menu and footer was there. No user, no post, nothing at all. I'll try again and I'll inform you as soon as I can work with that box.
and about the version, you're right but you should know how it's awful when you feel stuck..
Thanks again, I'll do it ASAP and inform you -
Did you happen to be logged in when you saw the blank forum? I saw some weirdness when I was importing posts a little while back on master where I wouldn't see any content unless I was logged in as an existing member
-
I think I wasn't logged in but as I told you, the website was not functional at all! even the HTML tags was not properly rendered(inspected using CTRL+U).
Now I've tried what you said and again failed with the same error message(NodeBB Upgrade could not complete, as your database schema is too far outdated). Here's what I did:$ git checkout tags/v0.6.1 $ ./nodebb upgrade After upgrade, I've seen some green notice regarding the database schema update and everything went smoothly. $ ./nodebb start And of course started and working like a charm Then I stopped the nodebb using : $ ./nodebb stop After that, I've tried to checkout 7 branch using: $ git checkout tags/v0.7.0 and I got error regarding the tags(and I think it's normal because my nodebb is running on 0.6.0 branch and doesn't know about 0.7.0 which is actually in future) So I ran: $ git fetch In order to get the latest commits/branches Then I successfully switched to 0.7.0 branch using: $ git checkout tags/v0.7.0 After that I tried to upgrade ./nodebb upgrade Oops, database schema outdated bla bla bla and that's what I've got in the end.
-
@BDHarrington7 Can't believe it! Now I believe in miracles
Here's what I did:1) git fetch 2) git describe --tags v0.6.0 3) ./nodebb upgrade Successful with some database schema update 4) ./nodebb start Works like a charm 5) git checkout v0.6.1 6) ./nodebb upgrade Successful with a bunch of database schema updates 7) ./nodebb start working perfectly 8) git describe --tags v0.6.1 9) git checkout v0.7.0 Previous HEAD position was 4686ae9... 0.6.1 HEAD is now at 43b90c5... fixed #3218 10) ./nodebb upgrade NodeBB v0.7.0 Copyright (C) 2013-2014 NodeBB Inc. bunch of info messages and database schema update 11) ./nodebb start Gosh! Finally!!!
And yes, now I believe it's perfectly possible to upgrade 0.6.0 to 0.7.0!
-
Awesome! glad you got it working
-
@BDHarrington7 Thanks a lot man, you've done some great enlightening regarding switching those tags
/sbin/cheers