What to backup? Just config and uploads?
-
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:
- backup the mongo database
- backup
/usr/src/app/config.json
- 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?
-
-
-
-
@Gliding9426 said in What to backup? Just config and uploads?:
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 something likesystemd
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:
- The database
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 likescreen
? -
@Gliding9426 Yeah, NodeBB can fork itself and maintain its own state if you prefer not to use separate tooling.