@Gargron

my harddisk slowly fills up, especially

public/system/accounts
public/system/preview

must be lost of federated stuff. is there a way to cleanup these folers? its over 15GB actually and i would love to reduce it or hold it at some level. we do not need any federated old stuff nobody shared, fav, or otherwise used.

@kmj @Gargron I clean out previews using a simple find on the filesystem. Doesn't work so well for accounts data, since Mastodon doesn't automatically fetch missing avatars and header images for known accounts (though you can force an update using tootctl accounts refresh --all).

When using the local filesystem, media expiry tends to result in having tons of empty directories, and I regularly delete those too.

@kmj @Gargron So that's like two cronjobs:
@weekly cd /home/mastodon/live && find /home/mastodon/live/public/system/preview_cards -type f -atime +7 -delete
(watch out for "noatime" mounts)
@weekly cd /home/mastodon/live/public/system && find . -type d -empty -print0 | xargs -0 -n 1 rmdir

@galaxis @Gargron

for the preview cards this works really fine. thank you very much.

if i am right, even i remove the accounts stuff (>9GB), an "tootctl accounts refresh all" would get all data back again, because actually there is no possibility to delete old toots?

@kmj @Gargron There is "tootctl accounts cull" to delete accounts that are not known by remote instances anymore (only works when the instance is still online though), and "tootctl statuses remove" to expire old remote toots that are not referenced by any local activity.
Neither of both had any immediate impact on my database size, but it should also remove media associated with the deleted accounts and posts.

Folgen

@galaxis @Gargron ah, need to check that out. i am more the mysql guy, but i do think postgress needs VACUUM FULL to regain the space on the harddisk. otherwise space is still used, even the records are deleted.

· · Web · 0 · 0 · 0
Melde dich an, um an der Konversation teilzuhaben
Mastodon

Mastodon ist ein soziales Netzwerk. Es basiert auf offenen Web-Protokollen und freier, quelloffener Software. Es ist dezentral (so wie E-Mail!).