Can I set up WDMyCloud as an rsync server for a Synology NAS?

Right now, I am using PC-based sync software to sync my shares between my Synology NAS and the MyCloud (backup). I get a very decent 12 to 15MB/s as the data round trips between the 2 NASes.

Synology Disktation has onboard software to sync to an “rsync server”. I have found some info on how to set up an rsync server.

http://everythinglinux.org/rsync/

Can I set up the Wd MyCloud to be seen as an rsync server? Would that work?

Or, maybe I could go the other way and run rsync from the WD Mycloud and then maybe create a CRON job to do this on a regular basis?

I am pretty ignorant in Linux so I am trying to see if I am in the right direction, and/or whether there are some caveats because of the proprietary nature of the MyCloud…

Hello,

I have never tried this before. Lets see if other users can share their experience in this topic.

yes it works fine. I use it between two mycloud drives. One is running the rsync daemon.

I’ve posted steps in the past on this forum on how to set it up. Its very simple. Search for posts by me i guess.

OK. I found this:

http://community.wd.com/t5/WD-My-Cloud/Horrible-rsync-performance-on-wd-cloud-vs-My-book-live/m-p/606311/highlight/true#M322

I will go through it

After a few months, I finally came back to my problem and succeeded doing the following

  • enable SSH on the NAS

  • log as root welc0me

  • type the following commands

nano /etc/rsync.secrets

^O to save to disk, this file will be left empty, but the file needs to be there

^X to exit nano

nano /etc/rsyncd.conf

Type the following into the file

[shares]

the following path works fine. When you setup the backup task in the Synology, you will be able

to choose the desired WD share

path = /shares
uid = root
gid = root
read only = no
list = yes

auth users = all

secrets file = /etc/rsyncd.secrets

the IP address is the one of the Synology backing up to the WD. This provides some security.

hosts allow = 192.168.1.4/255.255.255.0

^O to save to disk

^X to exit nano

rsync --daemon

#for the Linux learners like me, that is 2 dash signs in front of daemon

Then go to the SYnology and set up a backup destination as a r-sync compatible server. Enter the IP address of the WD (better to have a fixed one). Enter root and welc0me as the user name and password. Pick the “shares” in the list of modules. Then create a backup task using this destination. At that point, you will be able to pick a WD share as the backup directory for all the Synology data.

Run your backup task.

To start rsync automatically on the WD reboot, do the following:

In /etc/init.d/rsync

change

RSYNC_ENABLE=false

to

RSYNC_ENABLE=true

Same thing for  /etc/default/rsync

4 Likes

Etupes,

When I saw your “I am using PC-based sync software to sync my shares between my Synology NAS and the MyCloud”, I was So Glad that I might have finally found the solution.

I need to sync WDMyCloud and LacieCloudBox in my PC environment.  But your thread slowly changed to UNIX :frowning:

Can you tell me more about your PC based rsync config?

Lacie-CloudBox tech support gave me their rsync info (port number) and asked me if WDMyCloud can use rsync.

I may have to copy your PC sync conf  for my WD->LaCie or Lacie->WD backup.

Backup software provided by LaCie and WD doesn’t seem to have this capability.

Thanks.

Works like a charm. Thanks!

Sadly, I had so many performance issues with the WD My Cloud perpetually scanning and thumbnailing that I gave up and bought a different NAS. Now my WD has been relegated to a rather expensive backup drive but at least it can do that thank to your excellent instructions.

After following the steps, and entering in:

path = /shares

I am only able to see “shares” when I set up my Backup Task. I do not get the shares I have set up on the WD MyCloud. Any suggestions? Am I doing something incorrectly? Do I explicitly need to enter in a different “share” as opposed to the generic /shares ??

Thank you for your assistance!

Scott

Question - why does the rsync daemon need to be running? I currently have a Gen.1 MyCloud backing up via rsync script to MyBook Live NAS. And that NAS does not have rsync daemon running.

There can be a number of reasons to use daemonized rsync server.

In a nutshell:

Run it in a chroot (see fox_exe’s debian one. :P) for added security
Better support for large/long transfer sessions
More tolerant of firewalls
Per-user access level controls
etc.

Not sure how that is useful with a home grade nas appliance, but meh.

I did recently setup rsync daemon on mycloud gen2 device. If anyone is reading this here are few additional suggestions.

  • Create rsyncd.conf and rsyncd.secrets in your shared folders as /etc/* cleaned on reboot. After this you can start rsync as

EDIT: even better is to put this code in /mnt/HD/HD_a2/Nas_Prog/WDCrack/init.sh, and it will be loaded after reboot, provided you have installed WDCrack by Fox_exe

  • your rsyncd.secrets must be owned by root (or user starting rsync daemon) and it should be only readable by the root user.

  • add this line on the top of rsyncd.conf to write logs, it will help in troubleshooting

  • use absolute path in “path=”, variable , as /shares is actually a symlink to /mnt/HD/HD_a2/ in gen2 mycloud. Using symlink may cause trouble in rsync function.

PS: rsync with rsync daemon works faster as compared to rsync over samba, as rsync doesn’t have to read all files on NAS before deciding what to copy, (reading in NAS is done by rsync daemon)

1 Like

Hello everyone,

I just bought myself a WD Mycloud 8TB (2nd gen) in the hope I can set it up as a backup device for my Synology NAS. Unfortunately it seems this is not supposed to work, as WD does not support rsync out of the box… One should read technical features before buying I guess…

Now I found this forum and stumbled over this thread! Great, so it does seem to be possible…?!

Unfortunately I have hardly any knowledge of Linux and the instructions at the top seemed ok for noobs like me, but then I stumble over missing commands like “nano” when I logon to the device… I guess this is due to the 2nd gen as the original post seems to cover the 1st gen devices. Now there is the stripped down “BusyBox” on the device, which is not helpful at all :frowning:… There is vi however, so I could fight my way through this, if necessary I guess…
The welc0me password does not work for root either, I just used my admin pwd, does that make any difference?

Also, there is no file /etc/init.d/rsync where I could change the value as described. Do I need to create a new file with this line in it?

Is there anyone who has written down this step-by-stepps for Linux beginners like me?

I am desperate for this to work, alternatively I would just plug out the drive and put it in my Synology…

1 Like

You don’t need anything but ssh to the box. After you enable ssh and set the password, then you can do ssh sshd@mycloudex2ultra.local (that’s right for mine). Once you know that works, you can have rsync ssh to the server and start the rsync server there. Not quite as fast as setting up an rsync daemon, but it is more persistent, and less prone to error.

One thing you have to be careful about is that if you have setup a user “dan” (as I have), and then you rsync to sshd@mycloudex2ultra.local:/dan, that will be wrong. You have to do it to the shared directory where there is space.

I use the df -kh command to check this. But also look around. On my box, there is a directory /shares/dan which is a symbolic link into /mnt/HD/HD_a2/dan/ . So, I’m free to use either path, or any other path under /mnt/HD/HD_a2/.

Hello.

I got it up and running but only with transfer encryption off.

With encryption on I get this and no log on the WD Cloud rsync.log:

Any idea why?

Thanks.

Possible unacceptable/obsolete keys on the mycloud? (Open SSH client will refuse to handshake on the kinds of obsolete keys present by default on the mycloud. see here:
https://security.stackexchange.com/questions/112802/why-openssh-deprecated-dsa-keys )

If memory serves, the default ones used by its ssh daemon is crappy diffie-helman based, instead of elliptical curve, or even RSA.

While the MyCloud (gen2) uses a ram-based root file system, it copies the keys from a persistent configuration partition before the sshd starts, so replacing the key files there will persistently give quality encryption with user generated keys. (ALWAYS recommended to NOT use the baked in keys, because those keys live on many devices in the wild! Besides, they are weak sauce DSA keys anyway, which is probably why you are unable to handshake. OpenSSH will actively refuse them.)

I intended to put each device on a different office, having the backup done throughout the internet.
The ssh password will travel uncrypted, right?

These folks seem to feel that even without the ssh tunnel, the actual password will be MD5 hashed, not traveling in clear text.

Since rsync does not handle its own encryption and uses ssh for that, I stand by my suggestion that you generate new (actually strong) ssh keys, preferably in 4096bit RSA or ECDSA flavors, then put them on the MyCloud. I very strongly suspect that the openssh on the synology NAS is rejecting the handshake, because the mycloud is offering a DSA key that is getting refused, and there is no fallback.

If you do that, then the encryption will be much stronger, and the password will still be hashed before being transmitted.