moving nodebb

General Discussion
  • 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

  • @Peter-Zoltan-Keresztes

    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 start

    The site came up but was not able to login due to incorrect csrf token.

  • @Peter-Zoltan-Keresztes said:

    The site came up but was not able to login due to incorrect csrf token.

    This is most likely unrelated to your migrated NodeBB data. Probably incorrect theme files relative to your NodeBB version.

  • 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?


Suggested Topics


  • 0 Votes
    1 Posts
    533 Views

    Hi guys, I'm working in my forum www.foromovil.org without results at ranks.

    I want to know your suggestions to improve the SEO of my website, and your experience with your websites.

  • 0 Votes
    1 Posts
    704 Views

    Greetings Everyone!

    Its your boi sharlet here again with another problem lol. So I have setup an forum recently but I cannot register there the only way to acess the forum as an user for me is to login as the admin rather than that no way of registering!!

    I have tried to ask @PitaJ ( Global Moderator ) as he helped me alot with my forums but sadly hadnt recived an reply!

    It would be great to know why am I experiencing this issue!

    Thanks!
    King Regards,
    /shar

  • 0 Votes
    1 Posts
    884 Views

    Hello,

    I'm planning to use nodebb for a ~100 users forum.
    For conveniency, I would like to deploy it on production using docker.
    I have successfully deployed a test instance on docker (v0.6.1), and it's great. Nodebb is really easy and nice to setup, I really like it 👍.
    I will try to upgrade it to v0.7.x and test it before using it in production.

    I was wondering if people do use docker for production environments?
    Thanks a lot.

  • nginx problem NodeBB

    General Discussion
    2
    0 Votes
    2 Posts
    982 Views

    What error do you see on the server? NodeBB has crashed, hence you see the 502 error served by nginx.

  • 0 Votes
    3 Posts
    2k Views

    Yes, I'm in Vagrant linux virtualbox.

    The installation issue could be solved by 'npm install --no-bin-links'