Restoring never ends


(Vencent S) #1

So I’m migrating my Discourse instance to another server. According to Move your Discourse Instance to a Different Server, I created a backup and downloaded to my computer. Then I have a fresh installation on the new server. But when I try to restore, bad things happen:

[2018-04-27 11:32:32] 'vencent' has started the restore!
[2018-04-27 11:32:32] Marking restore as running...
[2018-04-27 11:32:32] Making sure /var/www/discourse/tmp/restores/default/2018-04-27-113232 exists...
[2018-04-27 11:32:32] Copying archive to tmp directory...
[2018-04-27 11:32:32] Unzipping archive, this may take a while...
[2018-04-27 11:32:33] No metadata file to extract.
[2018-04-27 11:32:33] Validating metadata...
[2018-04-27 11:32:33]   Current version: 20180308071922
[2018-04-27 11:32:33]   Restored version: 20171228122834
[2018-04-27 11:32:33] Extracting dump file...
[2018-04-27 11:32:33] Cannot restore into different schema, restoring in-place
[2018-04-27 11:32:33] Enabling readonly mode...
[2018-04-27 11:32:33] Pausing sidekiq...
[2018-04-27 11:32:33] Waiting for sidekiq to finish running jobs...
[2018-04-27 11:32:34] Restoring dump file... (can be quite long)

Then it gets stuck at the last line and never show anything new for like 20 minutes. But my site is so small that it wouldn’t take so long like this. Also, there is nothing new in /var/discourse/shared/standalone/log/var-log/postgres/current after a few minutes. I guess the restoring process seems broken… I tried again with no success. Is there any way to solve this problem?

FYI, the version of my old instance is 1.9.3 if I’m remembering clearly.


(Yoginth) #2

Just Reload the page you will see Finished! at last


(Vencent S) #3

Actually, what I’ve got after refreshing the page is:

500 Internal Server Error
If you are the administrator of this website, then please read this web application’s log file and/or the web server’s log file to find out what went wrong.

:zipper_mouth_face: I opened the website in an Incognito Mode window and it works. I guess the 500 error is because after the restoration, current user does not exists anymore?


(Daniela) #4

Can you update the original site to the latest version of Discourse and then create the backup to be exported?


(Vencent S) #5

This is also what I’ve tried to do.

However, since I’ve already resolved the domain to the new server and don’t want to resolve to the old server back again, I changed the domain in app.yml on the original server to a temporary domain and run launcher rebuild app. The worst thing of all is, I can’t even log in to the original site after rebuilding. So everything is quite in a mess now…

Anyway, regardless of the 500 error, the new site works fine at the moment. Still checking if anything goes wrong.

I guess the 500 error is because, after the restoration, the user operated restoration does not exist anymore. So I think this is kind of a bug? (at least we should have a proper notice in this situation)


(Jay Pfaffman) #6

If you need to You can back up from the command line and don’t need to log in.

. /launcher enter app
discourse backup

Rebooting the server might help. A bunch of stuff gets cached and reboot can fix that.