Posts: 27
Threads: 8
Joined: Jul 2024
Reputation:
0
Hi All.
I was wondering if it would be a good idea to use rsync to keep my music on my various Moodeaudio players in sync from a central location? Any foreseeable problems, pros and cons?
Scenario:
I am about to start the task of converting all my CD's (over 500) to flac. The flac files will be stored on a NAS. I have a Pi 5 with nvme attached. In addition, when i am mobile, i take this pi with me. I am aware I can copy these manually using smb shares, but i thinking if rsync is robust enough it could make for a automated solution.
Thanks in advance
Oh, i did search for 'music syncing' 'rsync' before posting, so apologies if this ais a repeat question
Posts: 6,030
Threads: 177
Joined: Apr 2018
Reputation:
235
(10-06-2024, 10:32 AM)bikerman Wrote: Hi All.
I was wondering if it would be a good idea to use rsync to keep my music on my various Moodeaudio players in sync from a central location? Any foreseeable problems, pros and cons?
Scenario:
I am about to start the task of converting all my CD's (over 500) to flac. The flac files will be stored on a NAS. I have a Pi 5 with nvme attached. In addition, when i am mobile, i take this pi with me. I am aware I can copy these manually using smb shares, but i thinking if rsync is robust enough it could make for a automated solution.
Thanks in advance
Oh, i did search for 'music syncing' 'rsync' before posting, so apologies if this ais a repeat question
moOde is built on a Linux distro and rsync should work just fine. Try it.
I don't see any reason to build rsync support into the moOde WebUI though.
Regards,
Kent
Posts: 130
Threads: 18
Joined: Apr 2021
Reputation:
4
I'm not that experienced with rsync, but you could also think about syncthing for this purpose.
https://syncthing.net/
Posts: 72
Threads: 3
Joined: Nov 2022
Reputation:
7
(10-06-2024, 10:32 AM)bikerman Wrote: Hi All.
I was wondering if it would be a good idea to use rsync to keep my music on my various Moodeaudio players in sync from a central location? Any foreseeable problems, pros and cons?
I use the following script to sync and then ask Moode to update the library...
You will need to change the file paths for your environment, I think yo also have to install your ssh key to stop it prompting for password every time.
Code: rsync -axz --zc=zstd --update --exclude 'albumart_backup' --progress --stats ~/Music/flac/ moode@azure-640h.local:/media/WD\ 240\ Gb/flac/ && curl "http://azure-640h.local/command/?cmd=upd_library"
Posts: 27
Threads: 8
Joined: Jul 2024
Reputation:
0
'A problem aired is a problem halved', in this case a problem solved Thanks @ steve4star for the script
Thanks @ TheOldPresbyope and @ Falco
Syncthing seems quite cool, but i think it will require a client install on the Moodeaudio install? Whatever the case, it seems have soluion with rsync
Posts: 130
Threads: 18
Joined: Apr 2021
Reputation:
4
10-06-2024, 05:33 PM
(This post was last modified: 10-06-2024, 05:37 PM by Falco.)
(10-06-2024, 03:57 PM)bikerman Wrote: 'A problem aired is a problem halved', in this case a problem solved Thanks @steve4star for the script
Thanks @TheOldPresbyope and @Falco
Syncthing seems quite cool, but i think it will require a client install on the Moodeaudio install? Whatever the case, it seems have soluion with rsync
Yes indeed, you will have to install syncthing on the underlying os. But it should be available for any os actually.
Posts: 6,030
Threads: 177
Joined: Apr 2018
Reputation:
235
@ bikerman
I read your original post to mean you will collect all your music files on a central NAS and want to mirror those files on your (portable) moOde player.
I would expect you'd want to run the mirroring process from the moOde player. Notice that the script posted by @ steve4star is the opposite. It's fine but the way it is written it would copy files from the computer on which it's executing to a target moOde player. As well, it is talking directly to the target system's file system.
I envisioned the following instead:
Since you're storing the files on a NAS, I would not assume it is capable of running rsync (although it might very well be). Instead, I'd take advantage of the NAS offering the music directory as a SMB share (NFS would work too but I don't use it). On the moOde player of interest, I'd mount that SMB share to some temporary directory, then use rsync to copy the files from that directory to my local music directory. When done I'd unmount the SMB share. That could be scripted along with the moOde command to update its library. There remains the question of when to trigger the script.
Notes-
1. rsync is already present in moOde (at least it is in 9.1.2).
2. rsync is like a Swiss Army knife. It has lots of options. If you're not familiar with it I suggest you look on the InterWeb for introductory articles about it.
Just my 2 cents worth.
Regards,
Kent
Posts: 27
Threads: 8
Joined: Jul 2024
Reputation:
0
(10-06-2024, 11:23 PM)TheOldPresbyope Wrote: @bikerman
I read your original post to mean you will collect all your music files on a central NAS and want to mirror those files on your (portable) moOde player.
I would expect you'd want to run the mirroring process from the moOde player. Notice that the script posted by @steve4star is the opposite. It's fine but the way it is written it would copy files from the computer on which it's executing to a target moOde player. As well, it is talking directly to the target system's file system.
I envisioned the following instead:
Since you're storing the files on a NAS, I would not assume it is capable of running rsync (although it might very well be). Instead, I'd take advantage of the NAS offering the music directory as a SMB share (NFS would work too but I don't use it). On the moOde player of interest, I'd mount that SMB share to some temporary directory, then use rsync to copy the files from that directory to my local music directory. When done I'd unmount the SMB share. That could be scripted along with the moOde command to update its library. There remains the question of when to trigger the script.
Notes-
1. rsync is already present in moOde (at least it is in 9.1.2).
2. rsync is like a Swiss Army knife. It has lots of options. If you're not familiar with it I suggest you look on the InterWeb for introductory articles about it.
Just my 2 cents worth.
Regards,
Kent
Thanks @ TheOldPresbyope and yes you are correct ,I do want to initiate the syncing process from the MoodePi as opposed to centrally from the NAS. This will also account for the times the MoodePi is offline; it can rsync when it comes back on. My NAS (Synology) does offer rsync thankfully and have used it for other things in the past.
My current thinking is to use crontab to schedule a job ro run rsync which i plan to configure to sync changed files.
what do you think?
Posts: 28
Threads: 6
Joined: Dec 2023
Reputation:
1
Hello bikerman,
why do you think it is better to sync the data to your players, instead of using the share on your NAS directly?
I use a device with USB 2.0 to share a M.2 SSD in the internal network, and everything is fast, even the update of the library is fast.
Your device has USB 3.0, so there should be no issue at all..
Simply create a NAS-Share under "configure->Library".
Afterwards start a library update, finished.
If you have stored new music on the nas, simply run the "update library" feature in Moode again.
Greets Tom.
Posts: 27
Threads: 8
Joined: Jul 2024
Reputation:
0
(10-07-2024, 09:42 AM)muddiver Wrote: Hello bikerman,
why do you think it is better to sync the data to your players, instead of using the share on your NAS directly?
I use a device with USB 2.0 to share a M.2 SSD in the internal network, and everything is fast, even the update of the library is fast.
Your device has USB 3.0, so there should be no issue at all..
Simply create a NAS-Share under "configure->Library".
Afterwards start a library update, finished.
If you have stored new music on the nas, simply run the "update library" feature in Moode again.
Greets Tom.
Hi @ muddiver
Two scenarios actually (1) when mobile and out of town, I prefer to have music on my MoodePi. On planes, in hotels or locations where network connectivity isn't availbe. (2) In my home. wifi signals in one of the rooms where I listen is not great. I get dropouts on 5Ghz and unreliable (choppy audio) on 2.4Ghz so cannot reliabe stream. Local storage simply frees me from these concerns.
I am however open to other options I may not have thought about
Thanks
|