I saw that version 0.8.0 was released. This is my second upgrade and I realized I should have a quick way to consistently run backups that would record the version that was backed up and time of the backup. I'm still new to Node.js and NodeBB so I thought I'd do it as a globally installable npm tool.
After installing the tool (npm install -g nodebb-backup) you just run it from your nodebb installation directory:
The version number captured is from package.json and the mongo info (yes, mongo only right now) is loaded from config.json. As described in the upgrade docs for NodeBB (https://docs.nodebb.org/vi/latest/upgrading/) it dumps the db and saves the /uploads directory. The db dump and /uploads copy are compressed into a tar named like this:
(which is saved to the directory above your nodebb install)
If this is useful to you, could you review the code and let me know if you think it is doing the right thing? Also, there are a number of additions that I think would be useful:
- Be able to provide a path to place the resulting back up file
- Redis support
- Maybe be able to restore from a provided tar file?
Anything else? Thanks for looking.