Is there a way to delete old/irrelevant uploads?

Well my problem did not disappear by it’s self. I had to manually delete my pre-S3-migration uploads to free some disk space. That did the trick, but in the process some of the oldest user avatar pictures were lost.

Right now all of my file uploads are stored in S3. I have not checked if avatar pictures are deleted properly from my instance. At least I have not noticed any noticeable buildup in local upload size.

2 Likes

When you moved to s3 was rake uploads:migrate_to_s3 run? Were all pre-s3 uploads lost?

2 Likes

No, they were copied to S3 and links in posts pointed to S3. My problem was that afterwards these files were not deleted from the local hard drive.

I’ve done one migration of uploads to s3 today with a small forum to test the waters. The old local uploads don’t seem to clear out automatically (if the CleanUpUploads job runs once per hour) with the ‘clean up uploads’ enabled unfortunately. I’d guess that this is because it’s checking for upload orphans in the S3 bucket exclusively once the migration is complete. I can see the old local files and subfolders when I navigate to:

/var/discourse/shared/standalone/uploads/default/optimized/
/var/discourse/shared/standalone/uploads/default/original/