@ChrisKey no
moving nodebb
-
Hello,
I have a nodebb which is using mongodb. I will need to move it to a different server but without using any post/users from the forum. Can anyone please suggest me a solution?
thanks.
Peter -
Backup your database and NodeBB.
Set up new server
Restore database on new server
Install NodeBB on new server
Run NodeBB
It's pretty simple. I have done it previously.
-
the question was how to backup the database I have tried to copy the files from /var/lib/mongodb to the new server. I have downloaded a new instance of the NodeBB run
npm install
./nodebb upgrade
./nodebb startThe site came up but was not able to login due to incorrect csrf token.
-
you should use mongodump -http://docs.mongodb.org/manual/tutorial/backup-with-mongodump/
-
I have migrated the nodebb to a different server. Exported the database with mongodump and imported it with mongorestore. I am getting it up and running when I try to log in I am getting:
Internal error.
Oops! Looks like something went wrong!On the log I see the following:
Error: invalid csrf token at module.exports (/root/nodebb/node_modules/csurf/node_modules/http-errors/index.js:32:16) at verifytoken (/root/nodebb/node_modules/csurf/index.js:237:11) at csrf (/root/nodebb/node_modules/csurf/index.js:100:7) at Layer.handle [as handle_request] (/root/nodebb/node_modules/express/lib/router/layer.js:82:5) at next (/root/nodebb/node_modules/express/lib/router/route.js:100:13) at Route.dispatch (/root/nodebb/node_modules/express/lib/router/route.js:81:3) at Layer.handle [as handle_request] (/root/nodebb/node_modules/express/lib/router/layer.js:82:5) at /root/nodebb/node_modules/express/lib/router/index.js:235:24 at Function.proto.process_params (/root/nodebb/node_modules/express/lib/router/index.js:313:12) at /root/nodebb/node_modules/express/lib/router/index.js:229:12
I have tried clearing the browser cache but it does not solve the issue.
-
You have to run the nodebb install script if you haven't. The one that asks you various questions about your setup
All I did when I migrated was set up a new NodeBB with the old database. Ran the NodeBB install script, entered all the settings and told it to use the old database.
I can write a more detailed guide if needed?
-
@Scuzz said:
All I did when I migrated was set up a new NodeBB with the old database. Ran the NodeBB install script, entered all the settings and told it to use the old database.
I have tried with both copying the old files and also install it as new Nodebb and at I run the npm install script then ./nodebb setup and made sure that I have selected the old db. Both are giving the same invalid csrf token error.
Yes a detailed tutorials would be nice to have.
-
@Peter-Zoltan-Keresztes said:
I have tried with both copying the old files and also install it as new Nodebb and at I run the npm install script then ./nodebb setup and made sure that I have selected the old db. Both are giving the same invalid csrf token error.
Noone has any idea how to fix the issues on hand?