We were previously using Discourse Hosted, but we’ve moved to self-hosting. How can we transfer our data from Discourse Hosted to our self-hosted setup?
Thank you in advance!
Sidi_Codet seeks help migrating from Discourse Hosted to self-hosting, having downloaded a backup during cancellation as advised by Moin and ondrej. While ondrej successfully restored their backup without changes, Sidi_Codet encountered errors related to a missing database function: discourse_functions.raise_discourse_voting_category_settings_readonly(). philh and others suspected version mismatches or missing plugins. supermathie and nathank recommended installing the discourse-post-voting plugin before restoring — but RGJ clarified the actual culprit was the topic-voting plugin, not post-voting. After installing topic-voting, Sidi_Codet confirmed the restore succeeded. pfaffman noted the issue was also fixed in recent Discourse updates. The community emphasized following the official backup/restore guide and ensuring plugin parity. Sidi_Codet, self-hosting on AWS Lightsail, expressed gratitude and promised to share their solution to help others facing similar issues.
We were previously using Discourse Hosted, but we’ve moved to self-hosting. How can we transfer our data from Discourse Hosted to our self-hosted setup?
Thank you in advance!
You can ask for a backup including all uploads. But I think you also get one when you cancel the hosting. (I think asking the Discourse team instead of the community support could lead to a more detailed answer, because they know the process better than random members of the community.)
You do. I asked at the beginning of the year and got this answer from the Team.
“As part of our cancellation process, we generate a complete backup of your site, including all uploads, which will be made available for you to download”
and were you able to migrate it successfully @ondrej ??
Hi, yes. I created / downloaded the backup then restored in on my new site ![]()
I did that and created a backup, which I downloaded. However, when I tried to restore it on the self-hosted platform, I encountered errors. Did you perhaps make any additional configuration changes before restoring, aside from changing the hostname?
I didn’t make any changes I just uploaded it with no issues. What kind of errors are you getting?
log.txt (3).zip (2.5 KB)
thats the error i am getting
Link to your self hosted site??
Did you see the error from your log?
[2024-10-25 17:35:57] ERROR: function discourse_functions.raise_discourse_voting_category_settings_readonly() does not exist
[2024-10-25 17:35:58] EXCEPTION: psql failed: ERROR: function discourse_functions.raise_discourse_voting_category_settings_readonly() does not exist
Here’s is the hosted Community
I suspect that you might have tried to restore it to a later version of Discourse - and the database has moved on.
If you start with a clean install of the same vintage as your backup, restore your backup, and then upgrade you should be sweet.
Please a guide on how to do this , please!
This is supported and should work fine.
Myself I’m not sure how the backup interacts with the defined functions… possibly it assumes they already exist in the discourse_functions schema.
Do you have this plugin (discourse-post-voting) installed? Try installing it prior to doing the restore.
That is good to hear! I probably got a bit confused about the other direction i.e. it isn’t a good idea to use an older version of Discourse with a current backup.
Yes, @Sidi_Codet do this! (and not what I suggested)
Its still not working prior to installing the plugin ![]()
> discourse-post-voting
@Moin referenced the guide above: Create, download, and restore a backup of your Discourse database
In my experience version need to be similar and
the new installation must have the same plugins installed otherwise the restore usually errors out.
Following the guide works… Keep trying @Sidi_Codet If you are going to successfully self host Discourse you are going to need to be able to do things like this, unless you have someone manage your server and Discourse for you. Keep at it, things get easy as you go. ![]()
Thank you @philh. I’ve been managing by reading references, searching on Google, and occasionally banging my head against the wall (just kidding, or am I?). But seriously, I couldn’t find any solutions. I’ve been reading more than I ever did in school, trying to find the earliest and most effective solutions. My eyes are blurry, my brain is mush, but I won’t give up!
If I find a working solution, I’ll make sure to share my response so that others can benefit from it. I think there’s a possibility that some developers may be facing the same issue, and it would be helpful to share my findings with the community.
Always good to share! ![]()
The backup and restore process is normally very straight forward. I am curious about where you are hosting your self hosted instance and how the install went for you.
I am using lightsail on AWS. The installation was pretty easy, the only issue I have is the migration.
This sounds like something @gerhard knows about.