Discourse Uploads Migration

I’m happy to report 40GB of Discourse uploads, going back to start of our forum have been migrated to our CDN. This is a requisite step before we can upgrade our 7 year out of date Discourse instance.

@urbanautomaton did all the prep work and got us over the line today. I can’t thank him enough!

We have a backup. Please let us know if you see anything unusual!

12 Likes

Amazing work @urbanautomaton and the others involved!

3 Likes

I don’t know if this is related or a coincidence, but I was reading through Planer/Thicknesser - Wadkin Bursgreen, and some of the images aren’t showing up inline with the text and appear as a broken pictogram. When I click on them it does open up the full sized picture correctly. Possibly some the downsized versions of the images were cached and are now missing?

1 Like

It looks like 2 issues:

  1. The images haven’t been moved across.
  2. The URLs haven’t been rewritten in the posts to the CDN.

Interesting, thanks for reporting. The first image does appear to be missing which is a concern, so I’ll look into that.

As @unknowndomain says, some of the other ones look like the discourse migration task hasn’t fully rewritten the URLs, e.g. within lightbox srcset attributes. Will look into that, too.

Actually no, that’s not correct - the first image was safely transferred. So this post just doesn’t seem to have had its URLs correctly rewritten.

I’ve fixed this specific post, and will try to find and fix other problem posts automatically, but for future ref the way to fix this is:

  • In the browser: edit and re-save the post (if you have that ability)
  • At the discourse rails console, you find and “rebake” the post (which just means re-convert it from forum markup into HTML):
# if it's the first post in a topic, e.g.
# https://discourse.southlondonmakerspace.org/t/planer-thicknesser-wadkin-bursgreen/2026
> Post.find_by(topic_id: 2026, post_number: 1).rebake!
# if it's a reply, e.g.
# https://discourse.southlondonmakerspace.org/t/discourse-uploads-migation/35190/5
> Post.find_by(topic_id: 35190, post_number: 5).rebake!

Edit: as a precaution I’ve rebaked every post in which there was a lightbox, which was around 6k of them.

3 Likes