• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.1 Latest
Buy Hosting

Setting up a new instance of NodeBB with old database?

Scheduled Pinned Locked Moved Technical Support
11 Posts 5 Posters 4.5k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Juxtapo
    wrote on last edited by Juxtapo
    #1

    Hey,

    When trying to update my forum to 0.7.1, my nodebb broke (Not sure if it was my fault or nodebb, I followed the same steps as I did when upgrading before). So I was wondering if I could use a MongoDB backup to keep at least the posts that were made on my forum into a new instance of NodeBB, since there's no way I'll figure out how to save the current forum, and I don't wanna bother someone to fix it for me. Is it as simple as setting up a new NodeBB and replacing the database with the backup after its running?

    Thanks!

    Other info:
    Ubuntu 14.04 on Digital Ocean VPS
    Mongo 3.0.4
    Nodejs 0.12.5
    Broke when updating from NodeBB 0.7.0 to 0.7.1

    1 Reply Last reply
    0
  • jareyJ Offline
    jareyJ Offline
    jarey Translator
    wrote on last edited by
    #2

    If i were you i would restore the database with the backup and try to do the upgrade again. Maybe you can figure out what was worng the first time and do it properly.

    I would say it is better not to mix bbdd and code versions, it could be so wrong.

    Regards.

    1 Reply Last reply
    0
  • J Offline
    J Offline
    Juxtapo
    wrote on last edited by Juxtapo
    #3

    There was all sorts of issues with NodeBB after I upgraded. My NODE_PATH was set to nothing, and after I set it back to the correct path it couldn't find any of the npm dependencies, and also it broke my MongoDB (Can't run it anymore, gives me this error:)

    Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145
    exception: connect failed
    

    So I can't really run the upgrade again.

    If anyone is up for the task of fixing the mess I made, I guess I can offer $10 or $20 if you can restore it to where it was before.

    Thanks

    F 1 Reply Last reply
    0
  • F Offline
    F Offline
    finid
    replied to Juxtapo on last edited by
    #4

    @Juxtapo, is MongoDB running? That error indicates that it's not.

    Determine its status by typing

    sudo service mongodb status
    

    If it's not running, start it:

    sudo service mongodb start
    J 1 Reply Last reply
    0
  • J Offline
    J Offline
    Juxtapo
    replied to finid on last edited by
    #5

    After entering mongod start, it instantly shuts itself off

    root@alpine:~# service mongod status
    mongod stop/waiting
    root@alpine:~# service mongod start
    mongod start/running, process 4339
    root@alpine:~# service mongod status
    mongod stop/waiting
    
    BriB F 2 Replies Last reply
    0
  • BriB Offline
    BriB Offline
    Bri Community Rep
    replied to Juxtapo on last edited by
    #6

    @Juxtapo Try looking at the logs for mongo, that's usually an indicator that something crashed. You can also check if there's already a process running that got in a bad state by entering the command ps aux | grep mongo

    J 1 Reply Last reply
    0
  • F Offline
    F Offline
    finid
    replied to Juxtapo on last edited by
    #7

    @Juxtapo, Lokk though the NodeBB logs using:

    sudo ./nodebb log
    
    1 Reply Last reply
    0
  • J Offline
    J Offline
    Juxtapo
    replied to Bri on last edited by
    #8

    @BDHarrington7 said:

    @Juxtapo Try looking at the logs for mongo, that's usually an indicator that something crashed. You can also check if there's already a process running that got in a bad state by entering the command ps aux | grep mongo

    Nothing has crashed, I restarted the VPS too and same issue. In the logs its giving me "Data directory /data/db not found", and I set the dbpath to the proper location but it isn't actually changing anything

    @finid The main issue I need to fix right now is the database, I can't do anything with nodebb until the database is working properly.

    Does anyone know if there is a way I can setup a new nodebb with my existing Mongo database? I feel like that would be much easier than repairing my Mongo and then repairing nodebb.

    F 1 Reply Last reply
    0
  • F Offline
    F Offline
    finid
    replied to Juxtapo on last edited by
    #9

    @Juxtapo

    The main issue I need to fix right now is the database, I can't do anything with nodebb until the database is working properly.

    But running that command will likely tell you why the application is not connecting to the DB...

    The fix, once the cause is determined, will likely be easier than a fresh install

    J 1 Reply Last reply
    0
  • J Offline
    J Offline
    Juxtapo
    replied to finid on last edited by
    #10

    @finid said:

    @Juxtapo

    The main issue I need to fix right now is the database, I can't do anything with nodebb until the database is working properly.

    But running that command will likely tell you why the application is not connecting to the DB...

    The fix, once the cause is determined, will likely be easier than a fresh install

    I can't even start the database on its own. A fresh install is very easy, would take under 30 minutes, and then if it is possible, I'm sure merging the old database isn't too hard.

    julianJ 1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    replied to Juxtapo on last edited by
    #11

    @Juxtapo What do the MongoDB logs suggest is the problem?

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development