How to restore a backup of an older version to a fresh install?

Continuing the discussion from Docker rebuild failed updating Postgresql: Signature verification failed:

After following the steps on the Discourse update page, I was asked to update via the command line. When updating via the command line, I was asked to update my app.yml, and the update essentially attempted to downgrade my postgresql install, resulting in all my data being lost. Luckily, I have several backups in an S3 bucket.

After a bit of work, my Discourse install was running, but it was a totally fresh copy. I pointed the backups directory to the S3 bucket, but was unable to see any of my old backups. To test that everything was configured correctly, I ran a manual backup, which appeared both in my Discourse Backups page and in the S3 bucket (alongside the previous backups).

I made very sure to keep lots of backups in case I somehow lost all my data. How can I restore from these backups?

  1. Go to /admin/backups and upload a backup there.

  2. Enable the setting allow restore

  3. Click on restore in /admin/backups


@Falco Thanks for the quick response.

So, I’m attempting to log in to the site, and it says I’m not allowed to log in because it’s in read-only mode. I specifically set the site to read-only mode until I was able to restore the data. How do I log in?

Do /users/admin-login work?

After entering my email, it went to a white page with the following text:

{"errors":["The site is in read only mode. Interactions are disabled."],"error_type":"read_only"}


SSH to the server, and then:

cd /var/discourse
./launcher enter app
rails c

Sounds good. I’ll be sure to post an update once I get a chance to log in this evening.

1 Like

Your data is never lost. On the host machine, look for postgres_data_old in /var/discourse/shared/standalone


@Falco It worked! I’m back up and operational! Thank you!


:tada: Great!

Thanks for the patience and perseverance!