A rake task for this now exists!
https://github.com/discourse/discourse/commit/925d1a78697dfb8e9549e0b9ba4f7e7f18235cfe
Here is an example of an import. It checks for bad settings (NOT FOUND), should show any errors (setting a username that doesn’t exist), and show you which settings changed, and will only update a value if the new setting is different from the current value.
$ rake site_settings:import < ~/tmp/settings.yml
starting import...
NOT FOUND: existing site setting not found for blake_key
Changed title FROM: Discourse TO: Blake's Site
Changed site_description FROM: TO: Blake's test site
ERROR: site_contact_username: There's no user with that username.
Changed invite_only FROM: f TO: true
Changed login_required FROM: f TO: true
Results:
Updated: 4
Not Found: 1
Errors: 1
Afterwards you can also check the Staff Action logs to verify the changes.
@pfaffman I do still really like your api version, and I would be the perfect tool to add to the discourse CLI app that I started working on a couple of years go that I haven’t had time for but would still like to exist.