Actually, I can’t find the uploads on S3. I ran a recursive ls on the upload bucket, and grep the results using the SHA1 of selected missing backgrounds.
Not sure where to go from there. I used the command below to extract the list of users who set a background, and will probably tell them that their uploads are lost.
User.find(UserProfile.where("profile_background IS NOT NULL OR card_background IS NOT NULL").pluck(:user_id)).pluck(:username)