ROCK: Sync internal storage with Synology

Hi
I was installing today my Inten NUC into Akasa case and I took the opportunity ot install also an internal storage.
Everything wnt well.
All my music files are stored on a Synology NAS. They should remain the master.
Put to play I’d like to copy/sync them to the internal storage.
At the moment I have a brain void. How should I do this?
Mayn thanks.

I don’t know about the Synology but on QNAP there is the Hybrid Backup System software, which can sync a folder over the network. I’d expect that the Synology has something similar.

2 Likes

Synology does not allow th backup to SMB folders.
Does anybody know how files can be copied (e.g. via rsync) to the internal sotorage of the Roon Optimized Core Kit?
\NUCLEUS\Data\Storage\InternalStorage

That’s the case with QNAP too, but it allows to sync a folder over SMB.

What I do is that I treat my ROCK storage as the primary storage because the ROCK is always running but the QNAP isn’t. Then I sync the ROCK to a folder in the QNAP and then I properly back up this QNAP folder to a versioned backup.

I realize that you have a Synology but I’d be surprised if it didn’t have similar facilities.

Ok. I could change that as well.
But how do you backup the ROCK storage to your QNAP?

The QNAP‘s HBS software can sync an SMB share to the QNAP which is what I do because the ROCK always runs but the QNAP doesn’t in my case. So I want to be able to copy new music to the ROCK and then the backup to the QNAP happens automatically once a day.

But the HBS can also do it in the other direction and sync a folder from the QNAP to the ROCK. So it would also be possible to use this to copy the latest version from the QNAP (and treat the QNAP as the canonical storage)

I have not done this personally but you might be able to get this working by doing something like this:

  • Mount the ROCK folder on the Synology by following this: Mount Remote Folders | File Station - Synology Knowledge Center

  • Set up a recurring user-defined script task by following this: Task Scheduler | DSM - Synology Knowledge Center

  • Your user-defined script would just be an rsync to copy from the NAS path to the mounted share. You probably want to use options like “-rt” which mean recursive and copy timestamps. You probably also want to use --delete to cause any files deleted on your NAS to be deleted at the destination. An example of this command would be

       `rsync -rt --delete /source/directory/ /path/to/mounted/destination/directory/`
    

You may need to run this with admin permissions. You can set this up and force it to run manually to try it out. When you’re satisfied that it works as desired, you can set it up to run daily or at whatever frequency you like.

Hope this helps.

Thanks a lot. In general understood.
Is the taks as a admin user or root?
Is htis correct?
‘rsync -rt --delete /volume1/music/ /volume1/RoonServer/ROCK/’
whereas music is my folder on the NAS with all the music files and ROCK is the mounted folder from the Roon Optimizied Core Kit.

In theory, you should use whatever works while granting the task the least possible permissions. In practice, though, it’s probably easiest to just run as root. I’d start there.

I can’t tell you for sure that the path you’re using is accurate because it’s specific to your environment. You need the source and the destination to be correct.

In “File Station”, you should be able to right-click on any share (in the left pane) or file/folder (in the right pane) and see its path by selecting “Properties”. That’s the easiest way to get the correct complete path to something.

A user named luddi helped me to perfectly syn the Internal Storage of my NUC with the Synology.
The script checks if the SMB drive of the NUC is mounted and syncs all files and deletes some files not needed.

if mount -l | grep -w '\‘10.100.5.70’\‘Data’\‘Storage’\'InternalStorage" on /volume1/RoonServer/ROCK" > /dev/null; then
echo YES
rsync -t -u -v -r --delete --delete-excluded --exclude=“@*” --exclude=“Thumb.db” --exclude=“.DS_Store” /volume1/music/ /volume1/RoonServer/ROCK/ | tee /volume1/homes/admin/Drive/$(date ‘+%Y-%m-%d_%H-%M’)_log.txt
else
echo NO
fi

1 Like

I’m glad you got this working! That’s an excellent way to do it. The exclusions make sense, and you get a daily log of what it does!