Linux’s rsync utility is a simple way to do incremental backups.This saves a lot of time, because rsync will only copy files that have changed. If you have a large collection of MP3s, for example, rerunning an rsync backup only copies the new files (or modified files if you’ve renamed or retagged them) to the backup.
Here’s how to set up the WD My Cloud to be able to back up to it and restore from it using rsync from Linux:
- If the MAC address of your WD My Cloud doesn’t show, try:
sudo arp-scan -l
- Copy the IP address that maps to the MAC address of your WD My Cloud
- Paste it into the address bar of your browser
- After logging in to your WD My Cloud, you should probably change the root password
- You can create users and shares from the GUI
- Shares will be stored in the /shares directory and are owned by root
- From the GUI, click Settings (you may need to scroll the top menu to the left to see this button)
- Select Network from the menu
- Set SSH to ON
Some important points:
- The default ssh user sshd is an alias for root. To log in to the box, run (substituting the correct IP, determined with arp): ssh firstname.lastname@example.org
- Do not try to back up to the root account. It is on a tiny filesystem. Instead, specify the full path to one of the shares you’ve created
- You can “dry run” any rsync command to see what it would do by including the -n option, but it doesn’t work well, IMO.
Example backup command:
rsync -ahv Documents email@example.com:/shares/jim
Restore with the same command, switching the source and destination:
rsync -ahv firstname.lastname@example.org:/shares/jim/Documents ~
You can use the file browser to look at what’s stored in your share.
Note: I followed the first two parts of How to create your own private DropBox with WD MyCloud to set a shared directory and the SSH daemon on the WD My Cloud. Later steps that in that document that show how to set up an rsync daemon do not work for me. It looks as though WD has removed the ability to modify the software using apt.
Here’s a knowledge base article on using rsync that I found helpful: Using rsync to Transfer and Synchronize Local and Remote Systems