What to backup? Just config and uploads?

Technical Support
  • Hello, I am quite a newbie, playing with nodebb.

    I don't understand how to run node.js standalone in a way that can be considered stable, so I run the docker image. Now, because of my inexperience I don't trust docker volumes at all, so I redirect directories. What I do in case of updates is: I delete everything, pull new image, replace files. What I am doing:

    1. backup the mongo database
    2. backup /usr/src/app/config.json
    3. backup /usr/src/app/public/uploads

    then after pulling fresh image, replace them.

    Because if I replace /usr/src/app or /usr/src/app/public I would have outdated program files, right?

    What do you think?

  • G Gliding9426 marked this topic as a regular topic on
  • G Gliding9426 marked this topic as a question on
  • G Gliding9426 marked this topic as a regular topic on
  • @Gliding9426 said in :

    I don't understand how to run node.js standalone in a way that can be considered stable, so I run the docker image

    Welcome to the NodeBB community! In fact, running "standalone" is much better supported (and easier) than the docker image you currently have. All that is required is the following (from a basic perspective)

    • Ubuntu operating system
    • MongoDB
    • NodeJS
    • NGINX or Apache (NGINX preferred, but there's also support for Caddy I think)

    The guide here will provide you with step by step instructions
    https://docs.nodebb.org/installing/os/ubuntu/

    You can always ask here too if you need some assistance.

  • I echo @phenomlab's sentiment, what exactly is giving you pause about a standalone installation? If it's the fact that you run the node app with node app.js, you should consider using

    to take care of the running and restarting of your app... or if not, just use the built in NodeBB loader ./nodebb start 😄

    As for the main question; just two things:

    1. The database
    2. public/uploads

    Everything else you can blow away. It does not hurt to preserve config.json too, but it can be easily reconstructed with ./nodebb setup.

  • it's just, in general, i can move docker containers with ease on a new server, that's the biggest advantage for me, especially when things start to go outside the project directory (systemd conf files, the nginx conf files, and so on)

    wait, if i type ./nodebb start it takes care by itself to stay in memory and i don't need to rely on ugly hacks like screen?

  • @Gliding9426 Yeah, NodeBB can fork itself and maintain its own state if you prefer not to use separate tooling. 👍


Suggested Topics