Move Navidrome cache out of /app/data so it isn’t backed up
-
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/cachehas 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’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/cachehas 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.
@jdaviescoates I thought rsync only copies what has actually been changed, but still good point (maybe navidrome is aggressively regenerating).
-
@jdaviescoates I thought rsync only copies what has actually been changed, but still good point (maybe navidrome is aggressively regenerating).
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.
-
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.
jdaviescoates said:
@timconsidine said: only copies what has actually been changedIt 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.
-
Glad you got it resolved.
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