Move your Discourse Instance to a Different Server

(Niv Shah) #30

I have done something very similar. I have a new Discourse instance live at, but with in the app.yml. Anecdotally, the domain setting seems to affect redirects after SSO, i.e. if I click “Log In” I am put back on the old Discourse instance.

I am still able to verify that the data and settings transferred to the new Discourse instance, which I think was your primary concern, and it doesn’t affect my existing Discourse instance at all.

As an aside, I think it might be worth explicitly stating in this HOWTO that after a backup is restored, the new Discourse instance should be rebuilt - I skipped over this step at first and didn’t find the existing language about “enabling any optional configuration settings” to be clarifying. Once I thought through how Discourse operates and rebuilt the app, all the settings, themes, custom images, etc worked perfectly.


Is this still the correct method of restoring via command line?

(Michael - #32

script/discourse restore <filename> is an easier way now.


How is this command executed in (a) production version and (b) development version? With bundle exec or do I have to rails c and then do it, or?

(Michael - #34

It is an executable script, so you can just run it like I have shown above.

(Mike) #35

Just uploaded Backup to new instance. The Restore button is greyed out. I’ve confirmed that I have same version on backup and new instance (minus the +192 after version number which I assume is some kind of counter).

It’s been about 10 minutes. Any idea what issue may be? Here’s what I’m seeing:

(Andrew Waugh) #36

Have you got “Allow restore” checked in Settings?

(Mike) #37

Thanks Andrew. Sorry I missed this in the instructions! Got it now.

(Mike) #38

FYI - Customize > “Text Content” didn’t come over with me from the backup restore. Had edited


Was able to grab from prior instance still, but perhaps the backup misses that part of customization.

(Andrew Waugh) #39

Did you do a shutdown -r after the restore?

(Mike) #40

Just did that. That probably would have fixed the problem. Can’t confirm as I had manually added that back. Will ping back if see anything missing from the move, but assume that may have fixed it. Thanks!

(Régis Hanol) #41

By “restart the instance”, I meant a rebuild of the container. There’s no need to restart the whole server :wink:

(Andrew Waugh) #42

Fair enough, but. “Ein reboot tut immer gut.”

(Paul) #43

I have been trying to clone a Discourse site from one location to another. They both have the very latest versions of Discourse. It appears to be failing due to some bespoke logo’s we have on the site. This is part of the log:

[2017-11-16 20:02:35] Disabling readonly mode...
[2017-11-16 20:02:35] Extracting uploads...
[2017-11-16 20:02:35] EXCEPTION: Failed to restore uploads.
rsync: chgrp "/var/www/discourse/public/uploads/default/original/1X/My_logo.png" failed: Operation not permitted (1)
rsync: chgrp "/var/www/discourse/public/uploads/default/original/1X/My_small_logo.png" failed: Operation not permitted (1)
rsync: chgrp "/var/www/discourse/public/uploads/default/original/1X/community_logo.png" failed: Operation not permitted (1)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.1]

We actually removed the logos from the site, did a backup and tried the restore again but it still failed. Presumably we have to actually physically remove the logo files but why is this?

Edit: I notice the owner of the files was set as root now set to 1000 and will try the backup and restore again.


10 posts were split to a new topic: Discourse to Discourse migration failing


What happens if I do below:

-Run a discourse(private) on server A with 30 users
-Run a different discourse(private) on server B with a few users
-When I download a backup file of discourse A and upload and restore in the discourse on server B

Q: What will 30 users on serverA get? Will they get emails or nothing happen to them?


(Jay Pfaffman) #51

The server a users will be on server B. The former server B users will be erased.


Thank you. Do you mean that serverA(DiscourseA) users can still access to DiscourseA, correct?

(Jay Pfaffman) #53

Yes, it’ll be the same site in both places. Not sure why you’d want that, but that’s what would happen.

(Christoph) #54

Are you trying to merge the two forums? In that case you don’t go via backups but Category export: