Images disappeared; nothing helps - container rebuilding, uploads:recover, and posts:rebake

AI-generated summary

A user reports that images, including the logo, avatars, and post images, have disappeared from their Discourse installation. Despite attempts to recover them using commands like rake uploads:recover, rake posts:rebake, and rebuilding the Docker image, the issue persists. The user mentions that the images were stored on a block storage device mounted via app.yml, and while new images are present, the old ones are missing. The discussion suggests the issue may be related to losing access to the block storage. The user is advised to check if the old images exist in the storage and to look for a tombstone directory, which may contain deleted files. A potential recovery method is suggested using rake uploads:recover_from_tombstone meglio, pfaffman, meglio, pfaffman, meglio, meglio, pfaffman.

Logo, avatars, and post images all disappeared.

I checked the uploads folder for one of the images - they are not there.

What might have happened, and any chance to recover?

I tried:

./launcher enter app
rake uploads:recover
rake posts:rebake

as well as rebuilding Docker image with ./launcher rebuild app.

Also, tried rake posts:missing_uploads and it output 0 post uploads are missing..

Did you migrate from Discourse.org hosting without downloading your images? Where do the broken images point to?

No migration. Images just disappeared one day.

One thing is that might or might not be important is that I attached a block storage when setting up Discourse, and mapped directories in app.yml like this:

- volume:
    host: /mnt/blockstorage/shared/standalone
    guest: /shared

Then it worked just fine for ~2-3 months or so. Then one day images just disappeared without me doing anything (except maybe rebuilding in order to update Discourse to the latest version).

Sounds like you lost your block storage somehow.

Does the block storage still exist? Do you see files in /mnt/blockstorage/shared/standalone?

The block storage does exist, and I can find NEW images in there — the ones I uploaded recently.

but the old ones are missing?

And there is nothing in tombstone?

Yes

Not sure what is tombstone and how/where I check it?

It’s under uploads somewhere. You might try

  find /path/to/images -name filename-of-some-image.jpg

to look for a missing image.

There is also a

  rake uploads:recover_from_tombstone

(If I remember and type correctly)