Wednesday, March 1, 2017

Synology Cloud Sync with Multiple Folders / Directories

If you have a Synology NAS running DSM, you are likely familiar with the Cloud Sync package. This package has lots of potential, but has one major blocker: each account can only sync one folder. This has supposedly been addressed via "tasks" in newer DSM versions (6+) but if you are stuck on an older version of DSM, you are limited to syncing one folder to the cloud service of choice (i.e. Drive, OneDrive, Amazon, etc). This is problematic if you have a folder structure where folders like Homes, Videos, Music, Photos, etc are all top level shared folders with various permissions. Say you want to back up all Homes and also Videos, Music, and Photos... you must back each one up to a different cloud service. This is a deal breaker. Alternatively, you can move your folder structure around, but that is also a deal breaker if you have multiple users with different permission levels on these folders.

What is the solution for DSM < 6 then? Permanent Symlinks
With permanent symlinks, you can create "virtual" directories that Cloud Sync will see as real directories to include in the sync. This allows you to have something like "\homes\user1\movies" that actually points to "\movies". Granted, your cloud backup folder structure will be different than your actual folder structure, you will at least get everything backed up.

To implement this, there are two steps:

  1. Make the links:
    1. SSH into your Synology
    2. Run "mount -o bind ‹TargetDirectory› ‹VirtualDirectory›"
  2. Make them permanent
    1. Run the link scripts at startup (more info at https://forum.synology.com/enu/viewtopic.php?t=102158)


No comments:

Post a Comment