Backup to the Synology Server using DeltaCopy with SSH

From SynologyWiki
Jump to: navigation, search


This guide will cover how to use DeltaCopy, a Windows rsync Client, with SSH Encryption to backup user data to the Synology product. This guide will also instruct in the creation of automated schedules.

The purpose of using DeltaCopy is to allow remote users to backup to their Synology system, such as when users are traveling on business trips, or stationed at remote offices.


This guide assumes the following

  • That Network Backup Services is Enabled on the Synology product
  • That Telnet or SSH Services is enabled on the Synology product
  • That you are familiar with the Synology Web Management Menu, and that you know how to manipulate permissions on the server
  • That you are familiar with performing file management functions, such as copying files from one location to another
  • That for the remote server, ports are forwarded as necessary
    • Data Port: 873
    • Encrypted Data Communications: 22
  • That you are familiar with manipulating Anti-Malware software to grant access to these Internet programs. Some Anti-Malware programs for example are:
    • Norton/Mcafee/AVG Anti-Virus Applications
    • Norton/Mcafee/AVG Internet Security Applications
    • Windows Firewall
    • Windows User Account Control
    • Windows Defender
    • ZoneAlarm
    • etc.
  • While not required: an understanding of Windows/Linux/Unix commands is recommended

Note: if SSH is not required, please refer to the steps that are colored purple

Software Requirements

The Synology server must be at software DSM 4.0 or above
UNICODE enabled cygwin DLL (for those of us that need to backup files w. special characters ie. with umlauts and such.)

Install DeltaCopy

Step 1:

Execute DeltaCopy Setup


Step 2:

Enter the Registration information
Note: it is recommended to install for all users


Step 3:

Change the destination folder to the following

C:\Program Files\DeltaCopy\

Step 4:

Review your changes, and finish DeltaCopy Setup


Install Cygwin

Step 1:

Execute Cygwin Setup


Step 2:

Set to Install from Internet


Step 3:

Set the Root Directory to

  • Install for All Users
  • Default Text File Type is Unix/Binary

Step 4:

Leave the Local Package Directory to Default


Step 5:

Use Direct Connection
Note: You may have to adjust this setting if necessary, depending on your network configuration


Step 6:

Select a server to to install from. If none are present, use this one below

Step 7:

Setup is acquiring the file list...


Step 8:

Add the following items to be installed


Step 9:

Setup is progressing...


Step 10:

Create a desktop icon and click Finish


Step 11:

To enable support for unicode characters download the unicode Cygwin dll and copy it to the DeltaCopy directory replacing the non unicode one.

Creating a SSH-Key

This section can be skipped if SSH is not required

Step 1:

Execute Cygwin, from your Desktop


Step 2:

Type into the BASH command prompt


Step 3:

DO NOT type in anything else. Just press the "ENTER" key until the application is finished and a key was generated and saved. Refer to the image for an example
Note: The key-finger print has been removed in the image
id_rsa is your Private Key, this remains on your computer is your Public Key, this will be installed in the Synology Server


File Manipulation Tasks

Steps 1, 2, 3 may be skipped if SSH is not required

Step 1:

Go to the following folder C:\Program Files\cygwin\home\UserProfileName\.ssh

  • Note: UserProfileName is the name of your Windows User Profile, it is a variable and will be different for each user

Step 2:

Move to \\DiskStation\NetBackup\

  • Note: DiskStation is the name of the Synology product, please adjust accordingly

The final location should be


Step 3:

Move id_rsa. to C:\Program Files\DeltaCopy\
The final location should be

C:\Program Files\DeltaCopy\id_rsa

Creating Authorized Keys on the Synology Server

This section can be skipped if SSH is not required

Step 1:

Telnet or SSH into the Synology Product as root and perform the following

> cd /root
> mkdir .ssh
> mv /volume1/NetBackup/ /root/.ssh/authorized_keys
> chmod 700 /root/.ssh
> chmod 600 /root/.ssh/authorized_keys
> chown -R root /root/.ssh
> chown -R root /root/.ssh/authorized_keys

Step 2:

Attached is the image of the final result


Authentication of Keys between the client computer and the Synology Server

This section can be skipped if SSH is not required

Step 1:

Go to [Start] --> [Run] --> Type cmd
Then type the following

> cd \Program Files\Deltacopy
> ssh -i id_rsa root@

Where id_rsa is the path of your private key
Where is the IP address of the Synology product

Step 2:

Type yes to add the server to the list of known hosts
Ignore the Permission denied message; this is normal.
If you are prompted for a password, then authentication has failed. Create a new key and repeat the process of importing the key into the Synology product. Be sure to delete the old key before importing the new key, and make sure that all of the permissions and ownwership is set correctly.
Note: The key finger print was removed in the image.


Configuring DeltaCopy

Step 1:

Launch DeltaCopy Client


Step 2:

Double Click on Add New Profile and enter in the following information

  • Profile Name: A name for the profile, such as Synology Backup
  • Server IP/Host Name: The IP address or DNS Address of the Synology Product.
  • Virtual Directory Name: Set to /var/services/NetBackup
    • Set to NetBackup if SSH is not being used

Then click Add Profile


Step 3:

Click on the Authentication Tab

  • User ID = Set to root
  • Password = Set to the Administrative password of the Synology Product
  • Note: Currently only root or rsync have the ability of writing data to the Synology Server

Step 4:

Skip this step if SSH is not being used
Click on the Options Tab
Enable Connect via SSH Go to Additional Parameters: and add the following code

-e "ssh -l root -i id_rsa"
  • Note: id_rsa is the path to your private key, in this case, it is relative to C:\Program Files\DeltaCopy which is why id_rsa was placed into that folder.

Step 5:

Click on File List and then proceed to click Add Folder
Add which folders that you would like to backup
For folders with spaces in the folder name, proceed with the nested instructions


Step 5.1:

Right-click on the folder which has space in it's name, and click on Modify Target Path


Step 5.2:

Modify the target path to have a BACKSLASH (\) BEFORE the space. Please refer to the examples

test Data/


test\ Data/

Step 5.3:

Skipping this step will result in a backup folder named test instead of test Data.

Step 6:

Right-Click on your profile name, and proceed with Run Now


Step 7:

The system will then perform a backup with the following window displayed. Attached is a sample log file

  • "root@\ Data/" is part of the first line, but moved to the second line due to space limitations
  • The example below outlines a SSH-based connection, Non-SSH users will see a different command line.

Executing: rsync.exe  -v -rlt -z --delete -e "ssh -l root -i id_rsa" "/cygdrive/D/test Data/" __
"root@\ Data/"
building file list ... 

created directory /var/services/NetBackup/test Data
2007.02.02.Lake Wenatchee/
2007.02.02.Lake Wenatchee/img_0324.JPG
sent 55675368 bytes  received 754 bytes  1661973.79 bytes/sec
total size is 56813443  speedup is 1.02
Profile 'taurus' executed in 32718 milliseconds. It ran successfully.

Step 8:

Here is the view of the data that was backed up


Step 9:

To create a schedule, perform the following.

  • Note: Make sure that Windows has the ability of writing new schedules and running schedules
  • a) Click on Modify Schedule
  • b) Click on New
  • c) Enter the when your schedule should start
  • d) Enter the frequency of your schedule
  • e) Click Apply
  • f) Windows will display a new prompt, enter the Username and Password to execute the task under
  • g) Click Ok to all Windows, close all windows, and you are done with creating an automated schedule of using DeltaCopy to backup your data to the Synology Product


Multiple Computers

This note may be ignored for non-SSH users
A key will have to be made for each user. For the authorized_keys file, append the file so it has keys from each of the public keys, do not create multiple files in /root/.ssh/. A recommended program to use to append the authorized_keys is Notepad++; be sure to disable word wrapping when editing the file. One key per line please! An example of the final outlook of /root/.ssh/authorized_keys is provided below

ssh-rsa ***Key here***== user1@machine1
ssh-rsa ***Key here***== user2@machine2

Known Limits

DeltaCopy, as it depends on Cygwin, does not support unicode characters without the special unicode cygwin.dll, or paths larger than 255 characters