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
  • Brite
  • 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

Offical apps | Community apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Navidrome
  3. Move Navidrome cache out of /app/data so it isn’t backed up
Everything related to the PHP CVE and eMudhra Cert Please read our Security issue thread - PHP and eMudhra cert compromise.

Move Navidrome cache out of /app/data so it isn’t backed up

Scheduled Pinned Locked Moved Navidrome
5 Posts 2 Posters 154 Views 2 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.
  • jdaviescoatesJ
    jdaviescoatesJ
    jdaviescoates
    Super Fan
    wrote last edited by jdaviescoates
    #1

    I’ve been looking into why my rsync backups have got so slow, and file count turned out to be the main factor.

    In my Navidrome app, /app/data/data/cache has about 68,000 files, 71% of the app’s total.

    It’s all resized artwork and transcodes that Navidrome regenerates on demand, so there’s no value in backing it up, but with rsync to an sshfs target every one of those files costs time on every run.

    Could the cache be moved to a persistent dir outside /app/data, as was done for Mastodon?

    Navidrome supports setting the location with ND_CACHEFOLDER, so it should be a simple change.

    Happy to test.

    Thanks.

    I use Cloudron with Gandi & Hetzner

    timconsidineT 1 Reply Last reply
    2
    • jdaviescoatesJ jdaviescoates

      I’ve been looking into why my rsync backups have got so slow, and file count turned out to be the main factor.

      In my Navidrome app, /app/data/data/cache has about 68,000 files, 71% of the app’s total.

      It’s all resized artwork and transcodes that Navidrome regenerates on demand, so there’s no value in backing it up, but with rsync to an sshfs target every one of those files costs time on every run.

      Could the cache be moved to a persistent dir outside /app/data, as was done for Mastodon?

      Navidrome supports setting the location with ND_CACHEFOLDER, so it should be a simple change.

      Happy to test.

      Thanks.

      timconsidineT
      timconsidineT
      timconsidine
      App Dev CA Maintainer Super Fan
      wrote last edited by
      #2

      @jdaviescoates I thought rsync only copies what has actually been changed, but still good point (maybe navidrome is aggressively regenerating).

      Indie app dev, scratching my itches : communityapps.appx.uk, portfolio at myca.appx.uk

      jdaviescoatesJ 1 Reply Last reply
      2
      • timconsidineT timconsidine

        @jdaviescoates I thought rsync only copies what has actually been changed, but still good point (maybe navidrome is aggressively regenerating).

        jdaviescoatesJ
        jdaviescoatesJ
        jdaviescoates
        Super Fan
        wrote last edited by jdaviescoates
        #3

        @timconsidine said:

        only copies what has actually been changed

        It does. But it still has to check every file to see what has changed and that's what takes the extra time when you've got tens of thousands of files that don't need to be backed up in the first place.

        I use Cloudron with Gandi & Hetzner

        jdaviescoatesJ 1 Reply Last reply
        2
        • jdaviescoatesJ jdaviescoates

          @timconsidine said:

          only copies what has actually been changed

          It does. But it still has to check every file to see what has changed and that's what takes the extra time when you've got tens of thousands of files that don't need to be backed up in the first place.

          jdaviescoatesJ
          jdaviescoatesJ
          jdaviescoates
          Super Fan
          wrote last edited by
          #4

          jdaviescoates said:

          @timconsidine said:
          
          only copies what has actually been changed
          

          It does. But it still has to check every file to see what has changed and that's what takes the extra time when you've got tens of thousands of files that don't need to be backed up in the first place.

          But it turns out file count wasn’t the main problem!

          It was mostly two huge database dumps. Fider had an 11 GB logs table (a 15.6 GB dump), left over from older package versions, as described in this thread.

          And Matrix had 86 million rows of state for an old room created by @abuse:matrix.org that nobody on my server is even in any more.

          Clearing those cut my rsync backup from nearly 3 hours to under 10 minutes!

          Moving the Navidrome cache out of /app/data would still be good, but it’s clearly minor by comparison.

          I use Cloudron with Gandi & Hetzner

          1 Reply Last reply
          2
          • timconsidineT
            timconsidineT
            timconsidine
            App Dev CA Maintainer Super Fan
            wrote last edited by
            #5

            Glad you got it resolved.

            Indie app dev, scratching my itches : communityapps.appx.uk, portfolio at myca.appx.uk

            1 Reply Last reply
            2

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            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