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 subdomain-new.example.com, but with subdomain.example.com 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.


#31

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


(Michael - DiscourseHosting.com) #32

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


#33

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 - DiscourseHosting.com) #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

js.composer.reply_placeholder
login_required.welcome_message

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.


#47

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