The user dax seeks to migrate a Discourse installation to a new server without importing site settings, as the original setup was a trial with altered configurations. The community suggests truncating the site_settings table before import to reset settings, which dax successfully tests on a local environment. However, after the migration, categories like ‘staff’ and ‘lounge’ are missing, and dax struggles to locate the staff_category_id setting, which is a hidden setting only modifiable via the Rails console. While some suggest avoiding full table truncation, others propose modifying the import/export rake task to selectively reset non-hidden settings. dax confirms the migration preserved data and customizations but encountered category issues. Mittineague provides the SQL command to truncate the table, and riking notes the hidden nature of certain settings. sam advises caution with full table truncation and suggests a more targeted approach.
We need to migrate all our database to a new bigger server (digital ocean).
We need to import only the database (users, passwords, posts, topics etc…) but we don’t want import the site settings, so we can’t use the normal way (backup restore).
That’s because in our installation the old admin delete some categories (like staff and lounge) and probably other things. Originally it was a trial installation to test Discourse so many settings have been touched or changed or even deleted and, I don’t know why, he has decided to make the forum public without a fresh installation.
Is it possible to do that in a easy way (if so, possibly step-by-step) to have a new fresh installation without lost all our data?
Now we have a new test installation without site settings (except “notification mail”)
We still have our data, plugins, groups and categories, and our personal customization (css, html and js).
Sorry, but where I can find the staff_category_id ? I tried on /site.json (here on Meta too) and I can see the id for all the settings except for stuff category.
Is it a hidden id?
Where I can find it?
Yeah I would not recommend nuking the whole site setting table here, but it is possible our site setting import/export rake task could be coerced to do this.
We basically want to work through all non hidden settings and revert them to default, some settings are hidden though and you don’t want to touch them.