問題
Mastodon cache 逐漸增長,再加硬碟大小好像也應付不來
mastodon@mastodon:~/live$ du -sh /home/mastodon/live/public/system/cache/*
45G /home/mastodon/live/public/system/cache/accounts
3.5G /home/mastodon/live/public/system/cache/custom_emojis
66M /home/mastodon/live/public/system/cache/media_attachments
73G /home/mastodon/live/public/system/cache/preview_cards
解決方式
注意:
tootctl
指令後可以直接接--help
看說明tootctl
部份指令後可以使用--dry-run
試跑- 因為會操作真實資料,請了解指令後再執行
清除 Accounts
90 天內沒互動的帳戶資料快取
tootctl mea remove --prune-profiles --days=90
清除 Media
超過一天的媒體快取
tootctl media remove --days 1
清除 Preview Card
超過 31 天的 Preview Card
tootctl preview_cards remove --days=31
結果
少了 80G,可以不用買硬碟了 (ry
mastodon@mastodon:~/live$ du -sh /home/mastodon/live/public/system/cache/*
17G /home/mastodon/live/public/system/cache/accounts
3.5G /home/mastodon/live/public/system/cache/custom_emojis
179M /home/mastodon/live/public/system/cache/media_attachments
19G /home/mastodon/live/public/system/cache/preview_cards