Mistakes when upgrading docker image to 1.3.3

AI-generated summary

Mistakes when upgrading docker image to 1.3.3

A user, CT075, encountered issues when upgrading their Discourse installation to docker image version 1.3.3. The rebuild process failed with a Pups::ExecError due to a PostgreSQL upgrade issue.

featheredtoast pointed out that the latest image release includes infrastructure updates, and provided a link to a topic outlining extra steps to resolve issues.

CT075 admitted to making mistakes during the upgrade process, including forgetting to backup the database and losing data. They were unsure how to restore their backups via SSH.

Chopper and CT075 discussed the importance of automatic backups and the possibility of restoring backups through the admin panel.

codinghorror and Chopper suggested setting up a fresh install and uploading the backup through the admin panel. cpradio emphasized the need to enable the allow restore site setting.

Ultimately, CT075 successfully restored their site, albeit with 10 days of data lost, and expressed gratitude to the community for their help.

Hi -

We were attempting to upgrade our discourse installation via ssh (as the online upgrader seemed to not be working) using the following commands:

 cd /var/discourse
 git pull
 sudo ./launcher rebuild app

However, on rebuild, we get the following errors:

 Pups::ExecError: /root/upgrade_postgres failed with return #<Process::Status: pid 46 exit 1>
 Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
 exec failed with the params "/root/upgrade_postgres"
 9e8b63f0e289db391bb044443f449b122b5180399e2bd231bcfb10c4ce12a92c
 ** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

There are no other errors that I can see, nor can I attempt to go back to the online site upgrader to retry (because the site is now dead due to the rebuild failing). We’d like to get our site back up ASAP.

Help?

I haven’t updated my instance yet, but I know that there were a lot of infra updates with the latest image release – take a peek into this topic here, this should outline a few extra steps to get things back up:

https://meta.discourse.org/t/discourse-docker-image-version-1-3-3-released/44778

Thanks, that was helpful!

Unfortunately, I think I managed to screw it all up by doing the pg upgrade stuff in the wrong order (specifically, I forgot to backup the database before rebuilding the app again). I do have the files saved as postgres_data_old, but I can’t seem to get at them (my pg9.3 also seems to have disappeared in favor of pg-xc). Am I screwed? Currently all I’m seeing is the default discourse install

what about automatic backup ? you havn’t one ?

We have an automatic backup (through discourse), though not of the entire server image. Is there a tutorial anywhere on how to restore backups via ssh? The only thread I found was this one, but it doesn’t seem to apply to me (the files shown are .gz files, but the files I see in the backups folder are .tar)

At least, if you have backup you can setup a fresh install of Discourse and then restore the backup from the admin panel. At least…

How would I do that? Would I just do a fresh install and copy the file (and/or my app.yml) into the relevant directory (and then the backup should just work itself)?

Go to Admin > Backups in your web browser. Click “upload” in your web browser and upload the backup there.

For now, i will just wait more answer, maybe you can restore everthing so wait.

About the backup, you have this on the panel admin, (upload and restore option)

I guess if you have a backup (and you can’t access to your current admin panel) you can setup fresh install then upload and restore the backup. :smirk:

Edit

don’t forget to allow backup on /admin/site_settings/category/backups thx to @cpradio

Thanks. I assume that this means I’m screwed any other way…

No, you need to enable the allow restore site setting to allow that restore button to be used.

Thanks for the help, everyone! We’re back online (with 10 days of data lost), thanks to everyone.