I can't restore a backup from NodeChef

I am in the process of moving our Discourse pilot from the (I know unsupported) NodeChef to a VPS on OVH. I created a backup on NodeChef and wanted to restore this backup on the fresh Discourse install on OVH. Now, the upload of the back worked fine, but the Restore button remains greyed out?

I have no control over the version on NodeChef (which is at the time of the backup was 2.3.0 beta3 +115) and the new install on the VPS is 2.3.0 beta6 +70. Can I get this backup restored?

You need to turn on the enable restoresite setting. From command line inside the container

 discourse enable_restore

But you can just search site settings for ‘enable restore’

3 Likes

Thanks @pfaffman, that enabled the Restore button!

… it started ok but then ran into error and it rolled back the restore.

[2019-04-01 12:14:31] ERROR:  relation "public.spatial_ref_sys" does not exist
[2019-04-01 12:14:31] invalid command \.
[2019-04-01 12:14:31] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2019-04-01 12:14:31] ERROR:  syntax error at or near "1"
[2019-04-01 12:14:31] LINE 1: 1 desktop 1dc8d521c04153d9db5348f3d45c749ec69c7dac /*! norm...
[2019-04-01 12:14:31] ^
[2019-04-01 12:14:31] ERROR:  syntax error at or near "-"
[2019-04-01 12:14:31] LINE 1: -ms-text-size-adjust:100%;
[2019-04-01 12:14:31] ^
[2019-04-01 12:14:31] ERROR:  syntax error at or near "-"
[2019-04-01 12:14:31] LINE 1: -webkit-text-size-adjust:100%}body{margin:0}article,aside,de...
[2019-04-01 12:14:31] ^
[2019-04-01 12:14:31] ERROR:  syntax error at or near "vertical"
[2019-04-01 12:14:31] LINE 1: vertical-align:baseline}audio:not([controls]){display:none;
[2019-04-01 12:14:31] ^
[2019-04-01 12:14:31] ERROR:  syntax error at or near "height"
[2019-04-01 12:14:31] LINE 1: height:0}[hidden],template{display:none}a{background:transpa...
[2019-04-01 12:14:31] ^ 

Are plugins, themes and components and all settings connected to these part of the backup as well?

From my understanding not plugins (nor components) … I am looking/hoping for content.

EDIT: your themes can be exported and imported via the themes settings

1 Like

I have now installed the plugins which were enabled on the NodeChef install as well as imported the Themes I tested. The restore is still giving me errors and it always rolls back. Is there any way around these errors?

That looks like a Postgres version issue, but it’s surprising with the Discourse versions being so close. Do you have a way to see what version of PG was on the server?

That’s a PostGIS table… apparently NodeChef has some spatial stuff installed.

You will need to fix your backup or maybe it will work if you run something like echo "CREATE EXTENSION postgis;" | psql in your container.

2 Likes

Those are two distinct things especially on non-standard installs.

The first line of the .sql file within your backup archive tells you which version it was made with.

1 Like

True enough, and as it turns out, it had nothing to do with versions of anything!

Doh! I guess I’d have noticed that if I’d looked at the file, but don’t look often enough to remember. I always appreciate your Postgres know-how.

Who’d have guessed that NodeChef would add stuff to the database? I guess my solution would have been to edit out that stuff from the SQL file.

3 Likes

Yeah, totally agree… but I would not recommend that without seeing the SQL file first so my first bet was to just see if installing postgis extensions would work - although that’s more like postponing the actual problem.

3 Likes

Thanks for the help guys but I have abandoned the restore and I am happy I no longer have to deal with the restrictions of NodeChef

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.