Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Mastodon
  3. mysterious tootctl media remove task

mysterious tootctl media remove task

Scheduled Pinned Locked Moved Mastodon
20 Posts 5 Posters 3.3k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • doodlemania2D Offline
    doodlemania2D Offline
    doodlemania2
    App Dev
    wrote on last edited by
    #9

    that's a great add, thanks for doing that @nebulon !

    1 Reply Last reply
    0
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #10

      Thanks for the hint, I have included the account pruning

      1 Reply Last reply
      2
      • nichu42N Offline
        nichu42N Offline
        nichu42
        wrote on last edited by
        #11

        I've changed the setting to 7 days and the runtime of the built-in cleanup script is now down to 1 hour / day, which is absolutely fine. I'd still like to schedule it for the night, though.

        Matrix: @nichu42:blueplanet.social

        1 Reply Last reply
        0
        • nebulonN Offline
          nebulonN Offline
          nebulon
          Staff
          wrote on last edited by
          #12

          since it doesn't matter much I will then put the package cron from current 11 11 * * * to 11 01 * * *

          1 Reply Last reply
          1
          • J Offline
            J Offline
            johannesjom
            wrote on last edited by
            #13

            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?

            girishG 1 Reply Last reply
            1
            • J johannesjom

              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?

              girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #14

              @johannesjom which script are you referring to?

              1 Reply Last reply
              0
              • nebulonN Offline
                nebulonN Offline
                nebulon
                Staff
                wrote on last edited by
                #15

                The package cron job for cleanup does use the upstream cleanup jobs. You can also change the retention days via https://docs.cloudron.io/apps/mastodon/#cache-retention-days

                J 1 Reply Last reply
                1
                • nebulonN nebulon

                  The package cron job for cleanup does use the upstream cleanup jobs. You can also change the retention days via https://docs.cloudron.io/apps/mastodon/#cache-retention-days

                  J Offline
                  J Offline
                  johannesjom
                  wrote on last edited by
                  #16

                  @nebulon i dit asume that /admin/settings/content_retention has other scripts behind, cause there you can change the days because you can set different days for different things there.

                  nichu42N 1 Reply Last reply
                  0
                  • J johannesjom

                    @nebulon i dit asume that /admin/settings/content_retention has other scripts behind, cause there you can change the days because you can set different days for different things there.

                    nichu42N Offline
                    nichu42N Offline
                    nichu42
                    wrote on last edited by
                    #17

                    @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.

                    Matrix: @nichu42:blueplanet.social

                    1 Reply Last reply
                    0
                    • nebulonN Offline
                      nebulonN Offline
                      nebulon
                      Staff
                      wrote on last edited by
                      #18

                      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.

                      1 Reply Last reply
                      0
                      • nichu42N Offline
                        nichu42N Offline
                        nichu42
                        wrote on last edited by
                        #19

                        @nebulon: This seems to be a quite comprehensive and well documented clean-up script: https://codeberg.org/Fedimins/mastodon-maintenance-tasks
                        Maybe you want to ship it with Cloudron?

                        Matrix: @nichu42:blueplanet.social

                        1 Reply Last reply
                        1
                        • girishG Offline
                          girishG Offline
                          girish
                          Staff
                          wrote on last edited by
                          #20

                          @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 exist
                          • tootctl accounts prune - remove accounts that have never interacted locally
                          • tootctl domains purge <domain> - https://docs.joinmastodon.org/admin/tootctl/#domains-purge
                          • run_tootctl statuses remove --days=xx - https://docs.joinmastodon.org/admin/tootctl/#statuses-remove
                          • tootctl media remove --days <days> --concurrency <concurrency> - https://docs.joinmastodon.org/admin/tootctl/#media-remove
                          1 Reply Last reply
                          3
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Bookmarks
                          • Search