Unable to restore from S3 backup - Fails

AI-generated summary

TehLeo is unable to restore a Discourse backup from S3, encountering a failure during the restore process with no clear indication of the root cause. Despite troubleshooting S3 connectivity and attempting manual CLI restores, the issue persists. Canapin suggests reviewing similar error logs on Meta Discourse and references a guide for handling problematic data during a paused restore. Following this, TehLeo identifies 9 problematic posts via a database query but is unsure how to proceed. Canapin provides detailed instructions for modifying or deleting problematic posts or uploads during a paused restore using the Rails console. TehLeo successfully deletes the 9 posts using Post.find(id#).destroy but does not confirm whether this was done during a paused restore. Canapin follows up to confirm whether the deletion occurred during the paused state, as proper timing is critical for the restore to proceed correctly.

I’m unable to restore from a S3 Backup of Discourse.

Steps to reproduce:

  1. Have a Backup of Discourse on S3.
  2. Setup a fresh install of Discourse.
  3. Create admin account.
  4. Connect Discourse to S3
  5. Locate the Discourse backup in my S3 backup lists
  6. Enable restore
  7. Attempt restore
  8. Restore Fails

Log:

I’ve tried everything I could with troubleshooting S3. I even attempted to move the backup to the server, and performed a CLI / Manual restore. It fails with the same log. I’ve tried turning off S3 Uploads. I’m unsure what my next troubleshooting steps are, or how to see exactly what post is causing the issue / remove it.

Thank you for any help!

Welcome! :blob_wave:

Does “everything” include looking at similar error logs here?

https://meta.discourse.org/search?q=%22posts%20are%20not%20remapped%22%20%22s3%20migration%20failed%22%20order%3Alatest

This result in particular:

I followed these instructions, and I recieved 9 posts from the quarry. The old post doesn’t detail what to do with these posts, or how to correct the issue past this point.

:warning: This is what ask.discourse.org returns, I cannot guarantee it’s safe or that it even works


So I was able to just delete all 9 posts using the following Rails command:
Post.find(id#).destroy

Did you run this while the restore was paused?