Way to backup the whole forum via admin dashboard?
-
It will be another step in NodeBB evolution - ACP Plugins
-
The only reason this is not implemented is due to permission problems with data stores... at least with Redis, being able to access redis and being able to save the database into a separate file are different actions and we can't really access the latter.
Writing about this has given me some ideas, so I'll think about it once again...
-
Alright, gave this a shot again, but ran into the same issues as before.
When redis saves the dump file, it's under the same ownership as the redis process, which in many cases is not the same user who is running NodeBB. This is good from a security standpoint, but means I cannot read the backup file, nor can I move it to someplace like
public/backups
.Currently Redis has no facility to change ownership of the dump file on-the-fly, nor does it have any sort of streaming database export tool like
mongodump
. -
KEYS *
-
I think there should be some sticky with a basic backup script that will back up everything.
some shell script or python or whatever.I have one backing up my mongodb but nothing backup the actual nodebb folder. This would probably easy to add to the current script.
Are there no linux whiz kids out there that can whip something up for the people who want a backup.
Can a plugin execute os commands on a server?
-
@Scuzz A plugin would only be able to execute commands that are available for the Node process. If you have your server set up correctly, then this probably wouldn't allow for the script to have enough rights to do everything it needed.
But you could possibly set up a python script that runs a server and the plugin interface with that server.
-
@PitaJ said:
If you have your server set up correctly, then this probably wouldn't allow for the script to have enough rights to do everything it needed.
Yes, this is always a concern. For example:
- What if our script cannot run the
mongodump
command? - What if
mongodump
is not found in$PATH
? - What if it's installed on Windows?
- What if our script cannot run the
-
@julian Supporting just one use case would give the possibility to anyone with a cheap vps dedicated to nodebb to adapt to it.
If it could backup all configurations and installed plugins, with a way to restore it in another fresh installed instance, that would be very good.