A discussion on best practices for managing disk space in a community with many images is underway. keith1 wants to avoid exponential disk space growth as the community grows and is seeking advice on user uploads.
itsbhanusharma suggests serving static resources via AWS to offload data from the server. meglio points out that local copies of images would still reside on the server, but itsbhanusharma clarifies that rebuilding the container and offloading images to an S3 bucket can resolve this.
Regarding backups, itsbhanusharma notes that they will contain references to images stored on AWS, and zogstrip explains that images stored on S3 won’t be backed up by Discourse. However, vinothkannans assures that restoring a backup will maintain S3 configurations.
I’m running a very visual oriented community (www.realtimevfx.com) and have watched my disk space creep up over the past year (obviously). I’m about to do some cleanup (per this discussion “https://meta.discourse.org/t/low-on-disk-space-cleaning-up-old-docker-containers/15792/83”), but I wanted to start a general conversation to get people’s thoughts on the best way to approach this - If I can avoid it, I’d rather not have exponential disk space growth as the community grows.
Are there best practices / standards that I should implement regarding user uploads? Should I disable uploads entirely and have people only host through imgur, etc?
Rebuild Your container once the Images are offloaded to s3 bucket and then all those can be safely removed from your local server. system is supposed to automatically clean up the content once it is properly uploaded to the AWS cloud.
it will contain necessary references to those images and when You restore such a backup, it will link them to Your instance’s AWS s3 configuration and look for resources in the relative directories afaik but maybe someone from the discourse team can provide better details about how backups are handled in case of files.
@HAWK@sam can You provide some extra details about how backups handle the media files uploaded by users?
When images are stored on S3, they won’t be backed up by Discourse anymore. This would be pointless since most of the time, you’re using S3 because you don’t have enough space locally.
If you want to backup your images, I’m sure there are plenty of tools available to do that by talking to S3 directly
@zogstrip one Question though!
what if that backup is restored when the site is moved to a new host? will that break all the images or will it be as simple as configuring with the same AWS details again to restore all the media?
I have several question about images storage/processing
I have two folders
/var/discourse/shared/standalone/uploads/default/original — 9GB in my case
../3X
../2X
../1X
/var/discourse/shared/standalone/uploads/default/optimized — 4GB in my case
../3X
../2X
../1X
Is there way to keep only optimized images?
Does folder
/var/discourse/shared/standalone/postgres_data/base
store the same images as folders above?
Is there any Discourse settings for storing images in lower quality?
Is there any client-side image optimization to make it lower size?