How do I know how many GB my site is?

I recently had the biggest problem with my server! Because my site started to have a lot of GB and I had to buy more GB on the server!

But the question is that it grows more and more the GigaByte content, how can I know where these GB are coming from? Is there any way I can delete these GB? Can I backup my forum on my PC instead of backing it up to the server and save on the server GB? If I delete all old topics from my GB economy forum? When my members upload gifs and videos to my site, does it weigh GBP? Is there an option to delete this? To stay just a few days on the server and delete yourself?

Hey. Not a Discourse pro by any means but you should be able to download backups present on the server to your PC and then delete the backup from the server. You should be able to import the backup from your PC when you wish to use it.

As for your question regarding the GIF’s, if you use an extension like Tenor, I don’t think it occupies any space as the image is rendered from their servers. However, if your users upload GIF’s, that might be a different story.

I’m not anykind power user, but I’m using this on shell:

cd /var/discourse/shared/standalone
du -sh * | sort -h

And after that I’m figuring out what to do next.

But nowadays videos and photos are huge hogs eating up all space. Videos are, and has always been, big in byte sizes. After everyone thought that more gigas means better photos thouse has started to be real issue too.

It is just waste of time to try educate users to do optimized images (and most of phones can’t even do it; that’s true specially with iPhones where such basic operation as downsizing images is not offered as a tool by OS itself, but it needs extra work.

Sure, Discourse does something, but on forums that use heavily images — it is more or less even standard today — it is not enough.

There is too options to do AFAIK:

  • use very low limit for size of downloads (and your users will be pissed off because theirs superhypergigaimages will be rejected)
  • doesn’t allow videos at all (and you users will be pissed off again because they just doesn’t want to use Youtube or similar because billion dollar socia media platforms allow videos)

This is a war we small fishes are already lost.

I’m using S3 as CDN but those fees starts to choke me.

Thanks for answering! I typed the command and this came up, what does each line mean? postgress_backup? tmp? state? postgres_data? uploads? backups? How can I delete these GB that appears?

I think I’m going to have to ban uploading videos of photos for good on my forum

image

thanks for answering! do you know where i download the backups and delete from the server? By the way, is it okay to do that? Delete it from the server and save it on the PC? What are these backups for? Is it my users information?

Totally. It doesn’t matter where you store it. I’m using Amazon S3.

It is you forum. Users, topics, downloads etc. It is everything else than software itself. Basically all you can’t retrieve another way if something goes badly wrong. By the way, it is missing app.yml so that one you should save ”normal way”.

Thanks for replying, what is ”normal way”.app.yml ?

Manually :wink: Like using FTP, or whatever.

The backups I think can be chosen to include media like pics and videos, or just backup the text. You should be able to see a separate backup section in the forum settings/admin area, if u can’t find it use search in settings.

As for your other question, you should be OK storing backups locally and then deleting the backup on your server. Provided you trust your hardware. I’d much rather prefer to also maintain copies of backups on a cloud service like Google Drive / Dropbox.

Edit: By Pics and Videos, I meant text + image + video, not JUST the media.

Hey @Danielabc, do you sometimes use ./launcher cleanup? It has to be done from time to time to clear older, unused Discourse images, and free some space. Just be sure that your forum is running when you use this command.

Here’s an example of an output:

root@mydiscourse:/var/discourse# ./launcher cleanup
WARNING! This will remove all stopped containers.
Are you sure you want to continue? [y/N] y
Total reclaimed space: 0B
WARNING! This will remove all images without at least one container associated to them.
Are you sure you want to continue? [y/N] y
Deleted Images:
deleted: sha256:eadbb445efe08669451160264ef5014c907cbb29a3c84c93203e7f38182094b1
deleted: sha256:be861fe3116344e0fe2a4aa098059473567311214ca8cdc9fcebc8a3244a3a12
deleted: sha256:35c0e5b87c0a7e798114e2965249beec12bfcb70f4379170a0aeeebb401b0ce6
untagged: discourse/base:2.0.20220128-1817
untagged: discourse/base@sha256:dcb4eb8e41a2e84f776f80587f308d167a54ad7ff4ba616199891828bbd4ddae
deleted: sha256:a26b638c0dd94970ba4a4e499fbe8c100c7a2c3dcdd4fb884ce717eafc990fcd
deleted: sha256:8b3dd9054a850686aabd0c45ef294bd36b8cfc9b5693b4fae0fb66323810cbd9
deleted: sha256:d167e86f5ccecb0fbc44fae442b23dc8264edc47a071a0615792ccfae04ecc7d
deleted: sha256:a663863cfea1075718d558112a45af869dc8b87537bd4e0490b1d5f428490f18
deleted: sha256:37a08dfbedfbb571a4d8b1595133edd85f7a47d4bd23b2c47fb2ed026b78da40
deleted: sha256:7c16c9f59a18734052a8903f879aa8353bc80c469a3bdafd398aa24bc59b78ff
untagged: discourse/base:2.0.20211118-0105
untagged: discourse/base@sha256:74b41fffd4f05433eb7c9b72954b1f5f8b15cd0e802bb724c96b7d699c3f6fa1sha256:c1455b2fdbca024c36c4e75746051b77c3637020cfa1e36a41440292a8c39424
deleted: sha256:77b323d4ec74aad770337f99a60e862a64ccc53f4775b5f4945df0e606f78b90

Total reclaimed space: 8.418GB
2 Likes