How do I sync data between my Synology NAS using Shared Folder Sync?
How do I sync data between my Synology NAS using Shared Folder Sync?
Purpose
Synology Shared Folder Sync supports the one-way syncing of data from one Synology NAS to another. This article will guide you through transferring your data using Shared Folder Sync.
Environment
- rsync services are enabled on your device. If not, on the destination NAS, go Control Panel > File Services > rsync, and tick Enable rsync service.
- The ports for rsync and SSH are open.1
- The server names of the source and destination NAS are not the same.
- If you need to sync the ACL permissions for files/folders along with their respective user accounts, refer to the Transfer ACL permissions section below.
Resolution
Create a Shared Folder Sync task
For more information about Shared Folder Sync, refer to the respective help articles for DSM 7.0 and DSM 6.2.
- The credentials of the destination NAS will be required to establish a connection. Refer to the information below according to your DSM version:
- DSM 6.2.4 and above: Other than using a DSM administrator account, you can also sign in with a domain or LDAP administrator account if the domain/LDAP server is joined to both NAS.
- DSM 6.2.3 and below: You can sign in using a DSM administrator account.
- On the source NAS, do one of the following according to your DSM version:
- DSM 7.0 and above: Go to Control Panel > File Services > Advanced > Shared Folder Sync.
- DSM 6.2 and below: Go to Control Panel > Shared Folder Sync.
- Click Task List > Create to open the Shared Folder Sync Wizard.
- Follow the wizard to create a sync task.2 3
- To run the sync task upon setup completion and whenever changes are made to the source shared folder, select Run sync on modification.4
- If you set the task to Run sync manually or configured an Advanced schedule, the task will not run immediately, but will instead run at the scheduled time or whenever you trigger it manually. You can trigger a task by clicking Full Sync or Sync now in Task List.5
Transfer ACL permissions
Shared Folder Sync can also sync ACL permissions along with files and folders; however, ACL permissions are all managed by UID.6 7 If the UID lists are different on each device, the ACL permissions might match up with the wrong user.
There are two ways that you can match up the UID list on both of your NAS: Join a domain/LDAP server and manage the ACL permissions using domain/LDAP user accounts or manually edit the system configurations on each device.
To join a domain/LDAP server on both NAS:
A domain/LDAP server helps manage user lists with just one server so administrators don't need to configure user settings on both devices. If you join a domain/LDAP server to both NAS, the UID lists of domain/LDAP user accounts will be the same on both devices.
You can join a domain/LDAP server to your device by doing the following according to your DSM version:
- DSM 7.0 and above: Go to Control Panel > Domain/LDAP, click Join and follow along with the wizard to complete the process.
- DSM 6.2 and below: Go to Control Panel > Domain/LDAP and go to the Domain or LDAP tab. For Domain, tick the Join domain checkbox and fill in the necessary information. For LDAP, tick the Enable LDAP client checkbox and fill in the necessary information. Click Apply when done.
To sync User/Group settings by restoring system configurations:
You can also match up the UID lists on both devices by backing up system configurations on the source NAS and then restoring only the User/Group settings on the destination NAS.
- Download the system configurations from the source NAS by doing the following according to your DSM version:
- DSM 7.0 and above: Go to Control Panel > Update & Restore > Configuration Backup tab. Click Export under Manual Export. Click Yes and a [Server_Name].dss file will be downloaded to your client device.
- DSM 6.2 and below: Go to Control Panel > Update & Restore > Configuration Backup tab, and click Back up configuration. Click Yes and [Server_Name].dss file will be downloaded to your client device.
- Sign in to the destination NAS.
- Restore the local user and group settings by doing the following according to your DSM version:
- DSM 7.0 and above: Go to Control Panel > Update & Restore > Configuration Backup tab, and click Restore under Restore DSM Configurations. Then, select Restore from a configuration file on your computer.
- DSM 6.2 and below: Go to Control Panel > Update & Restore > Configuration Backup tab, and click Restore configuration.
- Import the local.dss file by clicking Browse and choose the [Server_Name].dss file that you just downloaded from the source NAS.
- Do one the following according to your DSM version:
- DSM 7.0 and above: Tick the checkboxes for Users and Application Privileges, Groups and Application Privileges and Overwrite conflicting settings.
- DSM 6.2 and below: Tick the checkboxes for Overwrite conflicting settings, User, and Group.
- DSM 7.0 and above: Tick the checkboxes for Users and Application Privileges, Groups and Application Privileges and Overwrite conflicting settings.
- Click Done or OK to start the restoration. All services will be temporarily stopped until the process is complete.
Notes:
- Shared Folder Sync transfers data using rsync protocol, with the default port set to 873. If data encryption is enabled, SSH port 22 is also required.
- Shared Folder Sync can only connect to a NAS server via an IP or DDNS address. Connection via QuickConnect ID is not supported.
- If a task is set to sync the homes shared folder, the User Home function will be disabled on the destination NAS.
- The first sync will be a full sync. Afterwards, only modified files will be synced, meaning that the task will not run as long as no changes have been made to the shared folder.
- Tasks set to Run sync on modification will not send a notification upon completion.
- Advanced share permissions will not be synced, but will be enabled for the shared folder on the destination NAS with Read Only permissions for administrators. We do NOT recommend changing permissions settings or editing files/folders on the destination NAS, since the changes will just be overwritten the next time the Shared Folder Sync task is performed.
- The UID refers to the User Identifier, which is a code used to identify a user.