Claude Code - Resurected Dead vBulletin from 2016

I just wanted to share an experience for the lesser skilled and knowledgeable admins out there struggling through things. It started with me asking it about some lingering issues. It was giving me commands and talking me through things. But the real breakthrough was when I connected Claude code directly through SFTP and SSH…

image

Once connected, it did some amazing things! Our Discourse is just used for a group of friends and so we don’t have a lot of budget to do things if stuff goes wrong. Recently Claude Code found all kinds of small things off with my config.

  • Corrected my S3 on Spaces setup. I was close, but it still had some issues with JS assets loading correctly on rebuild. Full saga here: Digital Ocean Spaces (S3) "unable to sign request without credentials set" - #20 by DavidO

    • It got it tuned right up
  • Fixed the X.com Discourse JS loading instead of using an API key

  • Walked me through CDN setup, Cloudflare DNS settings and all

    • Rebaked it all
  • It found 4,000 orphaned Tapatalk images from our old phpBB migration and got them tied in

  • Converted a bunch of old BBCode to HTML so images would work

  • I fed it a screenshot of our bill and it reviewed the usage and found that my Digital Ocean Volume was completely empty. Further, it gave me the confidence to hit DELETE and save $/mo. I had moved everything to S3, or at least I was pretty sure I had, but I was still too nervous to delete it. Embarrassing really, but I didn’t want to lose any photos.

But what was ever more fun was that it gave me the confidence to take on another project, the resurrection of our old vBulletin board that had run from 2002 - 2016 for a college club. It fell into disrepair and was finally retired after giving a few phones the HIV. It was able to take an old backup and unpack it and rebuild it.

It did impressive work:

  • Imported 12,394 topics and 282,096 posts
    • The database was so corrupted that we exported pieces of it as separate table, pr pieces of tables, as CSVs since it wouldn’t do the full SQL file. More than 25 individual files. It pieced it together and then created the Discourse import file.
  • Migrated and reconnected 9,504 images from backup
    • Then it went in and pulled some missing ones from the WayBackMachine and other imports. I gave it a backup of a phpGallery2 that we used back then and it found 288 more images and tied them in across 735 other posts.
    • I just through directories and zip backup files at it and it sorted through and found all kinds of things and wired them right in
    • It couldn’t do much about the 7,000+ that were on Photobucket, unfortunately
    • Pulled in another 780 hotlinked images
  • Recovered 143 of 159 usernames who had previously been deleted and were just showing as “system”
    • also found their avatars
    • It even found my old avatar, a picture of the best good boy ever!
  • Censored 5,000+ “collegiate” ***** words affectionately known as: THE SLUR REPORT
  • It created new logos based on some old partials it had from the files
  • It recovered all of the classic vbulletin emojis and tied them into all of the posts
    • It reported that :flipoff2: was the highest used emoji (19,191 instances), followed by :rolleyes : and :beer : (distant followers)
  • It allowed for some find and replace on names, phone numbers, or emails that were public.
  • Walked me through moving to Resend API
  • Walked me through SSL configuration
  • Walked me through CORS configuration
  • Then before we got into it too far, it ran ClamAV scan on all of the files

It was in the background running almost a week, here and there over the course of multiple sessions. It’s been a fun window into the past as we find pictures and details about trips and projects.

I’m also thoroughly impressed that there are humans out there that know that this is doing…

Allow Claude to Run cat << ‘RUBY’ > /tmp/tapatalk_analysis.rb posts_with_tapatalk = Post.where(“raw LIKE ‘%uploads/tapatalk/%’”).where(deleted_at: nil) dual_ref_count = 0 tapatalk_only_count = 0 tapatalk_only_files = posts_with_both = 0 posts_tapatalk_only = 0 posts_with_tapatalk.find_each do |post| raw = post.raw tapatalk_urls = raw.scan(/uploads/tapatalk/[^\s"'<>)]]+/) has_upload_ref = raw.include?(“upload://”) post_has_dual = false post_has_only = false tapatalk_urls.each do |url| idx = raw.index(url) next unless idx start_pos = [idx - 200, 0].max context = raw[start_pos..idx + 10] if context && context.include?(“upload://”) dual_ref_count += 1 post_has_dual = true else tapatalk_only_count += 1 post_has_only = true tapatalk_only_files << url unless tapatalk_only_files.include?(url) end end posts_with_both += 1 if post_has_dual posts_tapatalk_only += 1 if post_has_only end puts “=== TAPATALK IMAGE ANALYSIS ===” puts “Dual reference (upload:// + tapatalk): #{dual_ref_count} refs” puts “Tapatalk only (no upload:// nearby): #{tapatalk_only_count} refs” puts “Unique tapatalk-only files: #{tapatalk_only_files.length}” puts “Posts with at least one dual ref: #{posts_with_both}” puts “Posts with at least one tapatalk-only ref: #{posts_tapatalk_only}” puts “—SAMPLE TAPATALK-ONLY FILES—” tapatalk_only_files.first(15).each { |f| puts f } RUBY scp /tmp/tapatalk_analysis.rb root@23.21.11.54:/tmp/ 2>/dev/null && echo “Uploaded”?

Extremely impressive.

Anyway, I just wanted to share in case the idea could help spur something fun for anyone else. Get a good backup and let’r rip!

Happy Discourse’n. :victory_hand:

2 Likes