Images lost after restore from backup (very old discourse install)

AI-generated summary

A user, watchmanmonitor, restored an old Discourse installation from backup but encountered missing images. Despite files being present in the tombstone, standard recovery commands like rake uploads:recover_from_tombstone didn’t resolve the issue. codinghorror asked if the domain name changed, but the problem persisted. tgxworld clarified that the correct job name for recovery is PostUploadsRecovery, not RecoverPostUploads, and that rake posts:missing_uploads wouldn’t affect the count. watchmanmonitor confirmed the PostUploadsRecovery job had run once, but RecoverPostUploads remained at zero. The issue was eventually resolved by referencing a guide on recovering missing images here.

I had an old ubuntu host that I didn’t feel like upgrading to ubuntu 18.

I followed the new host setup steps, then restored.

The site is up & going, but images seem to be missing.

All the files seem to be in the tombstone, but rake uploads:recover_from_tombstone doesn’t seem to help (nor does it fail with any error)

Rebuilding HTML on an individual post doesn’t work.

What could be done to get the images showing again?

The domain name did not change?

I’ve just had a heck of a time with this.. and can confirm that this command was never run:

 rails c
[1] pry(main)> OnceoffLog.where(job_name: "RecoverPostUploads").count
=> 0

How were we supposed to know to do this?

You weren’t supposed to do this by hand.

Try

rails c
OnceoffLog.where(job_name: "PostUploadsRecovery").count

At this point, It’s

# rails c
[1] pry(main)> OnceoffLog.where(job_name: "PostUploadsRecovery").count
=> 1
[2] pry(main)> 

Before I ran rake posts:missing_uploads the output of OnceoffLog.where(job_name:"RecoverPostUploads").count was 0

Note that the job name is different here so running the rake posts:missing_uploads didn’t change the count.

Got it, yes, OnceoffLog.where(job_name: "RecoverPostUploads").count is still 0

I’m looking at a way to push up every file from the backup I’m using.

This issue was ultimately solved in