WD Community

Backup Synology NAS to WD Cloud EX2 Ultra using rsync

Hello!

I’m having some trouble setting up a rsync server on My Cloud Ex2 Ultra running OS5 (FW 5.26.300). The objective is to backup data from a Synology NAS to the rsync server on the WD NAS using HyperBackup. I’ve been able to set it up and make it work but as soon as I reboot the My Cloud NAS, the Rsync server settings are gone. This is what I’ve done to set it up:

  • Login through ssh (I use putty)
  • Create the file /etc/rsyncd.secrets and leave it empty.
  • Create the file /etc/rsyncd.conf with the following lines:
    • [shares]
      path = /shares
      uid = root
      gid = root
      read only = no
      list = yes
      auth users = all
      secrets file = /etc/rsyncd.secrets
      hosts allow = MY.NAS.IP/MY.SUBNET.MASK
  • Start the daemon: rsync --daemon

Then, I go into Synology HyperBackup and set up a RSYNC backup

  • Server IP: the IP address of My Cloud NAS.
  • Encryption Off
  • Default Port (873)
  • user: root
  • password: root

And, like I said, it works but as soon as I reboot, all these configurations are gone. How can I make those configurations persistent?

Thank you for the help :pray:

I haven’t but I’ll write to them. Maybe they can help :+1:I thought I would have more success in the forum.

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?

Nevermind. It does no longer happen. It might have been a mistake on my part.

That makes sense. Maybe it wouldn’t be a bad idea to disable the delta-transfer algorithm on the first backup and then enable it for incremental backup changes.

Thanks for sharing this tip. Sadly, I can’t test it because I already returned the NAS to its owner.

For whatever reason, the Synology NAS of my client can no longer connect to their MyCloud EX2 Ultra RSYNC server. I think it could have been after a DSM update on their Synology (they started having issues in late December 2023). I’ve also tried upgrading the MyCloud Ex2 Ultra firmware to the latest version (5.27.157) but still nothing.

The RSYNC server configuration is executing correctly and the secrets file is also being generated without issues but the Synology NAS just can’t connect.

Anyone else having this problem recently?

How do I reinstall the Rsync Server App? The only app I have installed is USB Backups.

edit: Nvm, I just saw the stuff on the provided link. Thanks! As soon as I can test it out I will report back.

1 Like

I’ve tried that RSYNC third-party app and I was a bit confused at first because I was trying to use my configuration and it did not work. Later I realised that there are some configurable parameters in the app itself (via the MyCloud web interface) that allowed me to enable users and shares. It also generates passwords for every user but I can’t create custom passwords. That’s not really an issue for me but my worry is what happens when you reboot the NAS. Does it load back the same configuration (same shares and passwords) or do I have to redo it?

I will. Thanks! :pray:

I installed your Rsync Server (3.2.3) App, but it will not save the “grant access” changes I made to the folder I want for the location for my backups to go to. When I go back to check to make sure the change has stuck, it reverts to the top shared folder in my list. I have done this multiple times.

1 Like

I realize it’s almost 2 years later but I’ve been working on getting essentially the same setup to work (WD My Cloud Mirror to receive Hyper Backups via RSync) and finally got it to go. My issue had been that Synology could not access the WD share, despite being able to read its rsyncd.conf file.

The setup on this page worked for me: Backing Up a Synology NAS to WD My Cloud NAS using HyperBackup – Cyril Wendl

I think the key was that they had the rsyncd.conf file point to /mnt/HD/HD_2/[share name], rather than /shares/[sharename]. That’s my guess anyway, I’m no expert!

Next I’m going to try your solution for repeating the config on boot!

WD My Cloud EX2 Ultra resets everything in the /etc directory on reboot, which is why your rsync setup keeps disappearing. To make it stick, save your rsyncd.conf and rsyncd.secrets in a location that survives reboot—like /mnt/HD/HD_a2/—and use a simple startup script that copies them back to /etc and starts the rsync daemon each time the NAS boots. Placing that script in the persistent boot folder (/mnt/HD/HD_a2/.system/WDMyCloud/boot/) ensures the rsync server comes back automatically after every restart. This is the only reliable way to keep rsync running on OS5 since the firmware wipes system directories by design.

Hello.

I am considering the same move to reuse my old EX2Ultra as remote backup for my Synology.

I am planning to connect to the EX2Ultra with Tailscale and backup with rsync on Docker. Have you already tried that ?

Thanks.

Many thanks indeed for this. I used this, with customisation, to connect my MYCloud Mirror OS5, via SSH and rsync, to my UGREEN NAS, to act as a backup location. It is working perfectly, to my surprise and delight. For others who may have procured a UGREEN NAS, the UGOS sync and backup utility has a simple capability to connect to rsync that is easily configurable, especially if you follow the principles in @PGL and @kencarter556 ‘s posts. Note that My example is on a LAN only, with the WD on a different floor in my house - external will follow as I get more experience.

Thanks for this. For command-line noobs like me, would it be possible for you the send the exact text required in the startup script? I’d like to try this, but don’t know how. Also (skillfully demonstrating my ignorance), what are the commands to copy the rsync configuration files to the new location? Sorry for my lack of knowledge! Many thanks.

I have made such instruction here:

Many thanks for taking the trouble to reply. Unfortunately, the link to the post didn’t work for me. However, I have gone another path, so all’s good. Thank you again.

Good morning, I don't have much technical knowledge, but I know how to access MyCloud through the command line on macOS. Could you teach me how to make these changes to my MyCloud?

I wanted to add that this didn’t work for me until I added this to the rsyncd.conf file:

use chroot = no

After that, Hyperbackup was happy. Before that, it could see it, but not get past the setup page.

Support for Western Digital Hard Drives | Western Digital

Still Need Help?

Reach out to Support for more assistance.

Sign in to Your Support Account

Get up-to-date information about your products.

Western Digital Business Portal

Unlock benefits and tools for your business such as enterprise support, pricing and rebate tools, marketing, loyalty, rewards, and more.