Over the years I have accumulated a sizable music library (mostly flacs, adding up to a bit less than 1TB) that I now want to reorganize (ie. gradually process with Musicbrainz Picard).

Since the music lives in my NAS, flacs are relatively big and my network speed is 1GB, I insalled on my computer a hdd I had laying around and replicated the whole library there; the idea being to work on local files and the sync them to the NAS.

I setup Syncthing for replication and... everything works, in theory.

In practice, Syncthing loves to rescan the whole library (given how long it takes, it must be reading all the data and computing checksums rather than just scanning the filesystem metadata - why on earth?) and that means my under-powered NAS (Celeron N3150) does nothing but rescanning the same files over and over.

Syncthing by default rescans directories every hour (again, why on earth?), but it still seem to rescan a whole lot even after I have set rescanIntervalS to 90 days (maybe it rescans once regardless when restarted?).

Anyway, I am looking into alternatives.
Are there any you would recommend? (FOSS please)

Notes:

  • I know I could just schedule a periodic rsync from my PC to the NAS, but I would prefer a bidirectional solution if possible (rsync is gonna be the last resort)
  • I read about unison, but I also read that it's not great with big jobs and that it too scans a lot
  • The disks on my NAS go to sleep after 10 minutes idle time and if possible I would prefer not waking them up all the time (which would most probably happen if I scheduled a periodic rsync job - the NAS has RAM to spare, but there's no guarantee it'll keep in cache all the data rsync needs)
  • Alex@lemmy.ml
    ·
    2 months ago

    Syncthing should have inotify support which allows it to watch for changes rather than polling. Does that help?

    • gomp@lemmy.ml
      hexagon
      ·
      2 months ago

      Yes, Syncthing does watch for file changes... that's why I am so puzzled that it also does full rescans :)

      Maybe they do that to catch changes that may have been made while syncthing was not running... it may make sense on mobies, where the OS like to kill processes willy-nilly, but IMHO not on a "real" computer

      • Alex@lemmy.ml
        ·
        2 months ago

        Is it worth raising an issue with the project? Also enable logging to see if there are any clues as to why a rescan is being done?

  • platoose@feddit.uk
    ·
    2 months ago

    I use Nextcloud to sync a huge music collection and it works great - I was kinda surprised

    I run it on an underpowered NUC and it behaves beautifully

  • psivchaz@reddthat.com
    ·
    2 months ago

    You are correct that a reboot will trigger a full rescan. I'm always on the lookout for better sync. I just don't think it's out there right now for easy bidirectional sync.

    Basically, if you want to set and forget, Syncthing is the best option. If you want more control, you'll need to look into setting up rsync scripts or similar, which will at least better let you control how often to sync.

  • Wolf314159@startrek.website
    ·
    edit-2
    2 months ago

    I have a very similar setup to yours, a relatively large music library around 1.7TB of mostly flac files on my server. I'm able to organize these files locally from my laptop, which at various times has run either OSX, various GNU/Linuxes, or Windows. However I do not bother pushing the files themselves back and forth over the network.

    Even if I did, I wouldn't automate the syncing, I'd only run it manually after I'd done my organizing with Picard for that day. After all, it the organization with Picard isn't automated, why should the syncing be? I'd probably use rsync for this.

    In actual practice I do this: Connect to my server from my laptop using ssh, forwarding X. Run Picard on the actual server through this remote connection. Picard runs just fine over ssh. Opening a browser from a Picard tag for occasional Musicbrainz.org stuff is a little slower but works. I would then use a tmux or screen session to run the rsync command when I'm done with Picard for the day for syncing to a backup if necessary.

    I don't really bother keeping a whole copy of my music collection locally on my laptop or phone though, since It's been bigger than is practical for a long time. Managing multiple libraries and keeping the two in sync turned into such a hassle that I was spending more time organizing than actually listening (or making mixtapes/playlists). To listen to my music locally I've used either Plex or Jellyfin, sometimes MPD (like when my server was directly connected to my stereo receiver), or just shared the folder via samba and NFS.

    • gomp@lemmy.ml
      hexagon
      ·
      2 months ago

      The main difference is probably that I have a desktop PC rather than a laptop (plus, a few old hard disks lying around).

      I think I'll keep the local replica even when I'm finished reorganizing the library: the local copy doubles as a backup and I must say I am enjoying the faster access times.

      • Wolf314159@startrek.website
        ·
        2 months ago

        Oh yeah, I totally support the local copy. That will save you in times up hardware failure or fuck ups. I could just never keep up with the maintenance and kind of gave up making automatic backups and syncing. But reorganizing often translates to integrating deletions into rsync or whatever syncing protocol you use, and that has caused me headaches and heartaches.

  • fl42v@lemmy.ml
    ·
    2 months ago

    I suspect it's somewhat inevitable, since in order to sync you need to know what's the difference between files here and there (unless using smth like zfs send which should be able to send only the changes, I guess?). I'd probably tag everything at once and then sync

  • Creat@discuss.tchncs.de
    ·
    edit-2
    2 months ago

    Ad others have said, nextcloud won't rescan or reindex on a reboot. no idea why sync thing does, and surely there must be some way to disable that, too. I'm still hesitant to recommend NC as it's somewhat fragile, needs way more babying than I'm willing to keep up with and just does too many things, none of them anywhere close to "well". File sync on real computers works solidly if you have a reliable connection (don't get me started on Android).

    Have you considered using a real media-hoster, like Jellyfin (or like a dozen others)? Jellyfin works fine for music (the are other music-only solutions though). There are plenty of clients that can stream, and have offline support (download a subset/albums/playlists) for things like laptops, phones, ... The server can usually transcode audio formats that a client can't play, in real-time, if needed.

    Edit: I realize I wasn't clear as to what this means in practice. You essentially get a self-hosted Spotify. Your library, run from your server, optionally you can connect to it from anywhere.