deleting old crap
-
Heyas, I just ran a cleanup and was amazed that of my nearly 10GB it just deleted 60 MB(!) of cached files and 800 KB of preview cards. How can I get rid of all the crap lets say... order than 2 months? can't be all 5GB in the database, right?
-
replied to RazielKanos on last edited by
@RazielKanos where are you storing the media?
I store in Scaleway S3 object storage where you can create rules to move stuff into cheaper (free for first 75GB) slower storage eg after 2 months (or anything else you decide)
-
well, that would be only a temporary solution. I want to start soon a public Mastodon Node and have been running my own to get to know the service, what I can do and what I can't do. I have to say it's very limited from an admin point of view
-
@RazielKanos You can attempt to run this, note it may need modification:
https://gist.github.com/ThomasLeister/aa1c500eedeff19551f3bb8238533854
-
replied to RazielKanos on last edited by
@RazielKanos I just spotted this in another thread, possibly of use/ interest?
@alwynispat said in Mastodon 4.1.0 Released!:
I also recommend that the cleanup.sh to add the
tootctl media remove --prune-profiles
-
replied to RazielKanos on last edited by nichu42
@RazielKanos said in deleting old crap:
Heyas, I just ran a cleanup and was amazed that of my nearly 10GB it just deleted 60 MB(!) of cached files and 800 KB of preview cards. How can I get rid of all the crap lets say... order than 2 months? can't be all 5GB in the database, right?
tootctl media remove and tootctl statuses remove are run in the background with Mastodon v4 (settings can be found on the administration page).
What I am running every night (via cron job) is:
/app/code/bin/tootctl media remove-orphans
/app/code/bin/tootctl preview-cards remove --days=7
/app/code/bin/tootctl cache clear
/app/code/bin/tootctl accounts prune
and now with v4.1:
/app/code/bin/tootctl media remove --prune-profiles --days 7My instance has around 40-50 users and is connected to 8 public relays.
It is about 50 GB in size now (it was 80-90 GB with v4.0).
Hope that helps.