Automatic Admin settings backups

We have methods for automatic backups of the Discourse site Configure automatic backups for Discourse and there are methods for backing up the Admin settings to a YAML file Administrative Bulk Operations

It would be nice if the Admin panel could have a setting to simply automatically backup the Admin settings. Especially if it did an automatic backup every time a new setting was changed.

I understand there is a db table that holds these settings (described here Backup only Site Settings - #2 by dax ) which holds these settings, supposedly that would be included in the full site backups, however, it would be a lot more convenient to have copies of the YAML file output as described here How can I import/export settings into a file? - #4 by codinghorror to be saved automatically as a backup file as well, similar to how the container/app.yml is already handled.

So what you really want is for every time a setting change occurred, it was logged, and you could see who did it and what the old value and new values were?

Do you want something different from /admin/logs/staff_action_logs

2 Likes

yes, I mean to have a backup of the entire exported settings file, every time a change is made.

I have seen such things in other systems, in fact my home router has this functionality, every time a change is made a backup of the configs are made and you can set how many backups to keep and for how long. The same way the rest of the Discourse website is already getting backed up, except you cannot cleanly get the Admin Settings export file from it.

1 Like

If you changed a setting a year ago and want to restore it, your suggestion would wipe out all of the other settings. The current implementation allows you to restore any value ever set to every setting individually.

What do you want to do with a settings dump file? What problem are you trying to solve?

1 Like

quickly and easily roll back to known settings configurations

my home router actually does this and its very convenient. Every time you make a change to any setting, it creates a new timestamped file and retains some amount of previous config files, I usually have it set to save 50 old configs.

The way it works allows rolling back any setting. Wanting to roll back a bunch of settings at once seems like an edge case, though it’s still hard to imagine one.

1 Like

The intention is to roll back the entire site to a previous known good config.

1 Like