Synology NAS Network Backup to Windows Using DeltaCopy and rsync

Synology DSM 4.2 Backup and Restore Task Wizard (rsync)

Synology DSM 4.2 Backup and Restore Task Wizard (rsync)

Synology DS NAS devices have native functionality within Synology DSM to perform network backup to another Synology NAS, Amazon S3, or a rsync server to place the target files. I wanted to backup the files on the NAS onto my Windows installation using the DSM Backup and Restore task.

rsync is a protocol with an open-source command-line utility made for Unix-like systems. On Windows, the freeware program DeltaCopy makes running the rsync server service quite easy. But there were some hoops to hop through to get it working as desired, as it does have some limitations, including:

  • the lack of unicode character support (cygwin)
  • failure with file paths longer than 255 characters long (rsync)

The authors of DeltaCopy recommend replacing the cygwin library with a patched version to fix the problem of unicode characters, but in my usage this did not fix the more the crippling feature, which was was the 255 character short file path limitation. There is an easy workaround to both issues by using the rsync 3.0.6 Windows binaries compiled by Thomas Döring, placing the files in the DeltaCopy installation folder and replacing the files there.

The Synology network backup task fails with an error message when it runs into a problem from within DSM. To actually diagnose the issue, DeltaCopy’s rsync configuration has rsync logging disabled by default, so it must be turned on if you wish to find out what is actually happening. Within the DeltaCopy installation folder, the rsync configuration file is named ‘deltacd.conf’. You can add arguments to the configuration parameter ‘log file’ to debug any issues with the server. Refer to rsyncd.conf documentation for details.

DeltaCopy rsyncd.conf with logging enabled

Now you may wonder why we should bother with installing DeltaCopy at all, when the actual binaries for the rsync server get replaced anyway. The role of installing DeltaCopy is for ease of configuring the Windows service, rsyncd.conf from the ‘DeltaCopy Server’ GUI. You can achieve the desired results with the rsync 3.0.6 binaries alone if you are willing to write the configuration file and run the rsync server daemon yourself, which isn’t too hard either.

If you want to get rid of DeltaCopy completely, the uninstall process does not remove the Windows service it created on my machine. You have to use an elevated command prompt to delete the service yourself.

Steps to get this working:

  1. Download DeltaCopy, and the rsync binary is available from DeltaCopy’s ‘zip’ archive file
  2. Install DeltaCopy
  3. Extract rsync 3.0.6 files into DeltaCopy’s installation folder
  4. Run and configure DeltaCopy Server, installing the service with a local administrator account and creating a backup module (folder) that the service has permissions to read/write to. Synology requires that a username and password is set for the folder.
  5. Open the rsync TCP port (873)  inbound port within Windows Firewall as an inbound rule (Windows Firewall with Advanced Security). It is important to ensure that the network adapter active profile matches the one for the rule under the ‘Advanced’ tab.
  6. Test the connection from the Synology DS Backup & Restore page.

Tested with Windows 8 64-bit (DeltaCopy 1.4 by Synametrics, rsync 3.0.6 by Thomas Döring), Synology DS212J (DSM4.2).

(Edited 2016/08 to remove dead rsync download link)