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


  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
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

Cloudron Forum

Apps | Demo | Docs | Install

Mastodon media cache cleanup is doing nothing?

Scheduled Pinned Locked Moved Solved Mastodon
5 Posts 3 Posters 2.4k Views
    • 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.
  • W Offline
    W Offline
    whitespace
    wrote on last edited by
    #1

    I am running Mastodon on my Cloudron.
    Since the media cache tends to use up much space quickly I looked up a way to delete it from time to time.

    Fortunately there is already a cleanup script available in the mastodon terminal.

    /app/pkg/cleanup.sh
    

    Thanks for that.


    I tried the script as well as the pure command which is

    ./bin/tootctl media remove
    

    The outcome is this:

    Removed 0 media attachments (approx. 0 Bytes)
    

    I restarted the application, rechecked. The disk usage remained the same.

    Using the following command I checked, how things look from the tooctl´s perspective in contrast to the Cloudron volumes inspector.

    .bin/tooctl media usage
    

    Result:

    
    Attachments:    3.01 GB (3.54 MB local)
    Custom emoji:   4.98 MB (0 Bytes local)
    Preview cards:  63 MB
    Avatars:        101 MB (116 KB local)
    Headers:        297 MB (195 KB local)
    Backups:        0 Bytes
    Imports:        0 Bytes
    Settings:       204 KB
    

    As you can see the Attachments take up 3.01 GB and I can´t delete them. What is the problem? I do not understand. I suppose it is something specific to the Cloudron installation?

    doodlemania2D jdaviescoatesJ 2 Replies Last reply
    0
  • W Offline
    W Offline
    whitespace
    wrote on last edited by whitespace
    #0

    Solution:

    ./bin/tootctl media remove
    

    has an option

    --days
    

    which defaults to 7 days of not set.

    Our instance is only 3 days old. Since i did not set the flag it defaulted to 7 days.
    The system did everything right. There were no files as old or older than 7 days. Accordingly it did not delete anything. Computer smart.

    I was able to delete the cached media files.

    1 Reply Last reply
    1
  • doodlemania2D Offline
    doodlemania2D Offline
    doodlemania2 App Dev
    replied to whitespace on last edited by
    #2

    @whitespace Is there a default aging limit to what it will remove?

    1 Reply Last reply
    0
  • jdaviescoatesJ Online
    jdaviescoatesJ Online
    jdaviescoates
    replied to whitespace on last edited by
    #3

    @whitespace said in Mastodon media cache cleanup is doing nothing?:

    3.01 GB (3.54 MB local)

    I know nothing about this, but perhaps the issue is that only 3.54 MB are local?

    Just a random guess, but I'd guess perhaps you're not actually able to delete attachments posted by non-local accounts? 🤷

    I use Cloudron with Gandi & Hetzner

    W 1 Reply Last reply
    0
  • W Offline
    W Offline
    whitespace
    replied to jdaviescoates on last edited by
    #4

    @jdaviescoates I had this thought. I consulted other Mastodon admins. They say, they can delete everything. This should not occur.

    1 Reply Last reply
    1
  • W Offline
    W Offline
    whitespace
    wrote on last edited by whitespace
    #5

    Solution:

    ./bin/tootctl media remove
    

    has an option

    --days
    

    which defaults to 7 days of not set.

    Our instance is only 3 days old. Since i did not set the flag it defaulted to 7 days.
    The system did everything right. There were no files as old or older than 7 days. Accordingly it did not delete anything. Computer smart.

    I was able to delete the cached media files.

    1 Reply Last reply
    1
  • girishG girish marked this topic as a question on
  • girishG girish has marked this topic as solved on

  • Login

  • Don't have an account? Register

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

  • Don't have an account? Register

  • Login or register to search.