Backup only Site Settings

I would like to know the possibility of backing up Only Site Settings, just as opposite of what was asked here

The purpose is to replicate forums for different clients. If I can replicate settings, its easy to proceed with different categories, topics & users.

Please advise.

PS: I couldn’t understand by reading this

2 Likes

I think @zogstrip suggested entering the forum database you want to replicate (via SSH), clone the site_settings table into that database and replace that particular table in each new site you’re going to create.

4 Likes

I believe @techapj has expressed interest in this feature but we do not have it yet.

7 Likes

Alright.

So, I need to install Discourse as usual and take this step to replicate the settings. Will the instance version different make any conflicts here?

If we have to get the forum logo to new one, we will have to re-upload this, I suppose. Am I right?

Save https://yoursite/admin/site_settings.json. Use https://github.com/pfaffman/discourse-settings-uploader to upload them.

To install these settings to another site

Do this:

./discourse-settings-uploader HOSTURL API_KEY API_USER SETTINGS_FILE

For example:

./discourse-settings-uploader https://discourse.example.com d35989078a system site_settings.json

One caveat: It uploads only settings that are marked as changed. This means that if there’s some setting that’s changed on the site you’ve uploaded that you want to restore to default with the script it won’t work. The solution is to edit the JSON file so that the default value there doesn’t match the value you want to set.

Now what’s needed is a way to easily download all themes and then upload them. Uploading
a set of files shouldn’t be hard to do. Downloading themes by hand could be tedious, so some automated way to get all of them would be nice.

14 Likes

This sounds good. Will try this method next time I create a new forum.

I hope Discourse version difference will not make any issue, however I do update forums on regular basis… :slight_smile:

1 Like

As long as the setting is available it will be set. Settings that don’t exists can’t get set, but make only that it doesn’t get set. For example, if you have a plugin installed on the system your are copying from its settings exist only if the target system has the plugin as well. When that happens an error is presented for each unavailable setting.

4 Likes

Oh this would be such a life saver feature.

1 Like

See here: Administrative Bulk Operations

6 Likes

it would be super amazing if you guys add an option to export/backup current site settings into a file, and then allow the new forum site to import this file and have the same site settings. Can anyone do this please? its a very cool feature in case i want to have a full clone of my site’s data + settings.

What options do i have if i want a full clone of my current forum, user’s data/topics/posts/pictures etc as well as discourse admin and plugin settings the way i have configured it. Can anyone guide me please? @pfaffman

All i can save currently is my app.yml files and my discourse folder which contains a folder named shared, i think that has all the DB and user uploaded files?

2 Likes

Two ways to do that are described above.

Create a new forum. Backup your current forum. Restore that backup to the new forum. You can save some steps if both forums use the same S3 bucket for backups.

1 Like

Thanks for the quick reply,

Create a new forum. Backup your current forum. Restore that backup to the new forum. You can save some steps if both forums use the same S3 bucket for backups

Why do i need to do the manual site settings only backup?, if the above method already backs up all plugins settings & site settings, and pics/uploads/db/posts/topics etc.

If i follow these 3 steps, would my site export will give me a full backup of site/plugin settings as well as DB and file uploads?

  1. create a new forum.
  2. backup current forum by going to admin UI dashboard and going to backup section (not in command line,right?)
  3. restore this new backup i got in step 2 and insert it into new forum i made in step 1
  4. well i dont have any buckets for backup yet, my forum is simply hosted on a DO droplet and it is just in a directory on my server inside the var/discourse/shared folder. but i dont get why my discourse docket yml file is in /www/discourse i dont understand why all discourse files are being distributed in these 2 folders which reside on a different path. ?

Please confirm.