Can't restore backup


#1

I originally had discourse installed on google could, but I was having issues with them. I am now attempting to move to a new host, I had everything set up and when I tried to restore the backup it fails. I don’t know if this is because I am updating to a newer version of discourse or if it is because I used the bitnami version at first. The google cloud site broke when I tried to update it and I haven’t been able to fix it. All I have is the 1.8.4 version backup

This is the beginning of the error log:

[2017-08-24 23:10:53] [STARTED]
[2017-08-24 23:10:53] 'Seighten' has started the restore!
[2017-08-24 23:10:53] Marking restore as running...
[2017-08-24 23:10:53] Making sure /var/www/discourse/tmp/restores/default/2017-08-24-231053 exists...
[2017-08-24 23:10:53] Copying archive to tmp directory...
[2017-08-24 23:10:53] Unzipping archive, this may take a while...
[2017-08-24 23:10:53] Extracting metadata file...
[2017-08-24 23:10:53] Validating metadata...
[2017-08-24 23:10:53]   Current version: 20170824172615
[2017-08-24 23:10:53]   Restored version: 20170526125321
[2017-08-24 23:10:53] Extracting dump file...
[2017-08-24 23:10:53] Restoring dump file... (can be quite long)
[2017-08-24 23:10:54] SET
[2017-08-24 23:10:54] SET
[2017-08-24 23:10:54] ERROR:  unrecognized configuration parameter "idle_in_transaction_session_timeout"
[2017-08-24 23:10:54] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2017-08-24 23:10:54] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2017-08-24 23:10:54] ERROR:  current transaction is aborted, commands ignored until end of transaction block

(Jeff Atwood) #2

It looks to me like the versions of Postgres possibly do not match, because of the “unrecognized configuration parameter” line, I assume that is referring to Postgres configuration.


#3

What am I able to do to fix that?


(Jeff Atwood) #4

Check that the versions of postgres are expected?


#5

The version on the current server was lower than than on the original. I updated the version of Postgres on the new server to the same version that was running on the last server and it gave me the same error… Any other ideas?


(Jay Pfaffman) #6

You changed the postgres inside the container on the new host?

This post might help: Trouble upgrading PostgreSQL from 9.3 to current


#7

Yeah I updated postgress to the same version as the previous server. I ended up doing a fresh install of the bitnami stack of discourse instead of using the regular docker and everything seems to be working.


(Raphael Haase) #8

The idle_in_transaction_session_timeout error relates to your target Discourse installation where you are importing to using an older PostgreSQL version than the one you are importing from. You can fix it by deleting that one line setting idle_in_transaction_session_timeout from the dump.sql file inside the backup gz archive.