When an instance goes down, all of the images on it go with it. there’s going to be a lot from lemm.ee, especially given its size.

  • Admiral Patrick@dubvee.org
    link
    fedilink
    English
    arrow-up
    40
    ·
    edit-2
    3 days ago

    I’m gonna run some scripts on my instance’s database to look for posts that have lemm.ee pict-rs URLs and local thumbnails. Then update the url value to that of the local thumbnail_url. That’ll at least fix them on my instance where I have a copy.

    For comment images or ones where my instance didn’t create a thumbnail, they’ll just have to be broken I guess.

    • Shadow@lemmy.ca
      link
      fedilink
      English
      arrow-up
      12
      ·
      edit-2
      3 days ago

      Mind empowering my laziness and sharing that query?

      I was also planning on bulk locking all their communities, to avoid any isolated islands of people that don’t realize the community is gone.

      • Admiral Patrick@dubvee.org
        link
        fedilink
        English
        arrow-up
        7
        ·
        edit-2
        3 days ago

        I’m still putting that together, but it’s basically something like:

        UPDATE post set url = thumbnail_url where thumbnail_url like 'https://dubvee.org/pictrs/image/%' and url like 'https://lemm.ee/pictrs/image/%'

        For the Kbin users to clear out their avatar/banners, I just did:

        UPDATE person set avatar=NULL, banner=NULL where instance_id=(select id from instance where domain='kbin.run')

        UPDATE community set icon=NULL, banner=NULL where instance_id=(select id from instance where domain='kbin.run')

        …and will update that for lemm.ee

        I’m working on a Bun/NodeJS script to download the avatars, icons, and banners for all the lemm.ee users/communities, upload them to my pictrs, and then update the DB with the new values referencing the local images.

        Prob gonna have to break that up into two steps so I can download and file the images before lemm.ee goes down and upload/assign them after (so they’re not overwritten by federation).

        Not sure if I’m gonna do that for comment / post body images. Basically, I just want the archived communities to look nice.