Backing up USB drive on ROCK to NAS

Hi! I’m using rsync to back up my data from the Syno. Rsync is included on the syno, so I’ve put together a howto here that doesn’t involve the use of any terminal tinkering (though that can be fun too).

Having mounted the rock data folder on your syno, it will have a path similar to this (depending on where you mounted it): /volume1/Utilities/roondata/

What you’ll want to do now is create a shell script that backs up the music from one of the subfolders in that folder (/volume1/Utilities/roondata/Storage/usbdrivename)

The shell script can simply be a plain text file that you store somewhere. E.g. usbbackup.sh that contains the following single command:

rsync -av --delete --size-only /volume1/Utilities/roonstorage/Storage/usbdrivename [destination share and folder]

Explanation of flags:
av : a and v flags enable Archive (which also includes subfolders so you won’t have to worry about specifying the recursive flag) and Verbose mode, in case you want to verify what the operation does in the logs

delete means that files not present in the source will be deleted in the destination. This way, only content that is currently in the source will remain in the destination after syncing. Deletes in the source are repeated in the destination. Helps keep files in complete sync.

size-only means that the sync is less exhaustive - it checks the source and destination file size, and if they’re a match, no copy is done. This allows for a quicker sync than the normal file compare mode that rsync uses.

Finally, to schedule the task, you can use the Task scheduler in the control panel. Schedule a task that runs on particular days, for example. The screenshot below shows my setup:

You can see the command starts with bash - that’s the command to invoke the synology linux shell, followed by the path to the shellscript (.sh file)

If you don’t want to schedule the task but rather run it on particular times, just set a schedule, and then after saving remove the tick box in the list of tasks. That will effectively disable the scheduling, and you can manually select the operation and choose Run at your own discretion.

As you can see from the example screenshot, I use this to back up music on my syno to an external USB drive that I connect to the nas every now and then, but the principle is just the same.

4 Likes