mysterious tootctl media remove task
-
It's not in the CLI docs yet, but 'accounts prune' does work and is quite helpful.
https://github.com/mastodon/mastodon/pull/18397If you add this too, I can indeed remove my custom cronjob. But please also add an option to control when the cleanup.sh is launched. 11:00 is not a good time for my server, I'd like to keep the cleanup processes running in the night, just before the scheduled backup.
-
This script also puts quite a lot of load on our server. Is it really still necessary to use it yourself instead of the clean-up scripts provided by Mastodon?
-
@johannesjom which script are you referring to?
-
@johannesjom It seems that the internal routine does remove some content, but as most of the admin settings and options, it's very poorly documented, if at all. I have no idea which tootctl commands exactly are triggered, or when that happens.
I guess you have to go through lots of Issues and PRs to find out about this. As long as it's unclear, I think it's a good idea to have an additional cleanup script (such as the one provided by Cloudron) to make sure that the installation doesn't take too much space. -
at least last time I had checked the code, the UI settings were actually different from what they are now, but it is still not clear to me who and where those cleanup tasks are run or if the settings are just the default for the cli tasks we run in the package via cron.
-
@nichu42 good link...
I had a look at https://codeberg.org/Fedimins/mastodon-maintenance-tasks . I couldn't run the script directly because there's a bunch of hardcoded paths in it. Found some commands that maybe we can incorporate. Many of the commands are already in our cleanup script.
tootctl accounts cull --concurrency xx
- removes remote accounts that no longer existtootctl accounts prune
- remove accounts that have never interacted locallytootctl domains purge <domain>
- https://docs.joinmastodon.org/admin/tootctl/#domains-purgerun_tootctl statuses remove --days=xx
- https://docs.joinmastodon.org/admin/tootctl/#statuses-removetootctl media remove --days <days> --concurrency <concurrency>
- https://docs.joinmastodon.org/admin/tootctl/#media-remove