[Synology ] rsync backup on a secure LAN with a slow DSM 4.0 Synology NAS

I needed to make a backup with rsync on a secure LAN.
Unfortunately, my Synology NAS CPU is very slow, and using SSH is less an option for tera-bytes of data.

Let’s say you want to copy data from user@192.168.0.200:/home/user/data to server_user@192.168.0.250:/data/of_user:

  1. Option 1: Using built-in rsync
  2. On the Web interface, open up the Control Panel, then go to “Network Backup” under “Network Services”.
    Tick the “Enable network backup service” option and click the “Apply” button.
    Then edit the file /usr/syno/rsyncd.conf, and add the following section:

    [data_of_user]
    path = /data/of_user
    comment = This is the 'data' folder
    read only = no
    uid = root # or ?
    gid = root # or ?
    auth users = server_user
    hosts allow = 192.168.0.200
    hosts deny = *

    Then, edit the file /usr/sino/etc/rsyncd.secrets, and add a user and password:

    server_user:passwd

    Finally, start the rsync daemon:

    $ sudo /usr/syno/bin/rsync --daemon
  3. Option 2: Using ipkg rsync
  4. Install rsync via ipkg:

    $ sudo ipkg install rsync

    Then, edit the file /opt/bin/rsyncd.conf, and add the following section:

    [data_of_user]
    path = /data/of_user
    comment = This is the 'data' folder
    read only = no
    uid = root # or ?
    gid = root # or ?
    auth users = server_user
    hosts allow = 192.168.0.200
    hosts deny = *

    Then, edit the file /opt/bin/rsyncd.secrets, and add a user and password:

    server_user:passwd

    Finally, start the rsync daemon:

    $ sudo /opt/bin/rsync --daemon

Then, finally, on another computer, start the following command (with the ‘::’ to disable SSH use):

$ sudo rsync --progress --stats --verbose --recursive --times --perms \
local_folder server_user@192.168.0.250::rsync_folder_name

I got about 30 MB/s using rsync directly instead of about 10 MB/s using rsync through SSH, which is almost 3 times faster.

Advertisements

One thought on “[Synology ] rsync backup on a secure LAN with a slow DSM 4.0 Synology NAS

  1. Thanks for posting your solution. I followed this approach and the backup is definitely faster.
    Is there a tutorial you can point me to where I can put my script in crontab?
    I am not so sure how Crontab functions on a Macbook Pro – not to mention I am not so clear about Crontab in the first place.

    Thanks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s