Way to backup the whole forum via admin dashboard?

General Discussion
  • So I know you can backup a forum via mongodump (I am using mongodb) and manually backuping public uploaded resources, but is there a way I can backup via admin dashboard while not touching the console at all? Thanks

  • Currently there isn't any way to do this. If you want to automate this process consider looking into crontabs

  • Plugin & Theme Dev

    It will be another step in NodeBB evolution - ACP Plugins 😉

  • GNU/Linux

    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...

  • GNU/Linux

    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.

  • NodeBB

    Yeah redis-dump might work, didn't know it also had the json to redis commands feature.

  • GNU/Linux

    Comparatively, mongo is fairly easy, as long as you're on a linux machine, we'd fork a process out to mongodump.

  • 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?

  • Global Moderator Plugin & Theme Dev

    @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.

  • GNU/Linux

    @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:

    1. What if our script cannot run the mongodump command?
    2. What if mongodump is not found in $PATH?
    3. What if it's installed on Windows? 😄
  • GNU/Linux

    @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.

Suggested Topics

| | | |