Backup Synology NAS to WD Cloud EX2 Ultra using rsync

With the help of @Martok I was able to find a solution. Bear in mind that I’m not using SSH because it slows things down considerably and I don’t need it.

So, in order to reload that config on every boot, I downloaded USB Backups from the App store and I modify its init.sh file (vi /shares/Volume_1/Nas_Prog/USBBackups/init.sh) with these lines at the bottom of the file (I’ve added some instructions that might be useful to the inexperienced usesers):

echo "Starting rsync with custom settings..."

# RSYNC.SECRETS FILE CREATION
# rsyncd.secrets contains all of the usernames and passwords that will be able to log in to the rsync daemon. These are independent of the user that exist in the system.
# Add each one per line, separating user and password by a colon.
 
cat <<EOF > /etc/rsyncd.secrets
testuser:testUserPassword
EOF

chmod 600 /etc/rsyncd.secrets



# RSYNCD.CONF FILE CREATION
cat <<EOF > /etc/rsyncd.conf

# lock file is the file that rsync uses to handle the maximum number of connections
# use any of your shared folders. Mine is /shares/BKP/
lock file = /shares/BKP/rsync/rsync.lock

# pid file is where the rsync daemon will write the process id that has been assigned to it
pid file = /shares/BKP/rsync/rsync.pid

log file = /shares/BKP/rsync/rsync.log

# secrets file defines the file that contains the usernames and passwords of the valid users for rsync
secrets file = /etc/rsyncd.secrets


[BKP]
    path = /shares/BKP/
    comment = Synology NAS Backup

    # When the rsync daemon is run as root, uid is used to specify which user owns the files that are transfer from and to.
    uid = testuser

    # When the daemon is run as root, gid allows us to set the group that own the files that are transferred.
    gid = share

    # read only determines if the clients who connect to rsync can upload files or not, the default of this parameter is true for all modules.
    read only = no

    # list allows the module to be listed when clients ask for a list of available modules, setting this to false hides the module from the listing.
    list = yes

    # auth users is a list of users allowed to access the content of this module, the users are separated by comas. The users don't need to exist in the system, they are defined by the secrets file.
    auth users = testuser
    
    # hosts allow contains the addresses allowed to connect to the system. Without this parameter all hosts are allowed to connect.
    # hosts allow = 192.168.1.0/255.255.255.0

EOF

chmod 700 /etc/rsyncd.conf

rsync --daemon

Since the file /shares/Volume_1/Nas_Prog/USBBackups/init.sh is persistent on every boot, I can guarantee that my custom config is loaded up on every boot.

PS: I’ve observed that changing parameters on your shares loads back the default rsync settings. So if you make changes, either reboot or execute the /shares/Volume_1/Nas_Prog/USBBackups/init.sh script.

---------------------- EDIT ----------------------

Btw, if anyone knows how to improve RSYNC transfer speeds, I’m all ears. I had the DSM custom ROM from Fox running for a few days on the EX2 Ultra and its RSYNC and WebDAV transfers were much faster. These are the test I run:

  1. Synology NAS running Hyper Backup → connect to WD NAS using RSYNC (DSM ROM) → transfer speed: ~40MB/s

  2. Synology NAS running Hyper Backup → connect to WD NAS using WebDAV (DSM ROM) → transfer speed: ~50MB/s

  3. Synology NAS running Hyper Backup → connect to WD NAS using RSYNC (OS 5 ROM) → transfer speed: <10MB/s

All of these tests were done without encryption.

So it’s clear that the My Cloud EX2 Ultra is capable of receiving data through RSYNC much faster but, for some unknown reason, OS 5 is capping it to 10 MB/s

Any ideas?