This post describes how to backup a local folder from iCloud to a Synology NAS using
rsync is a console tool that copies files either to or from a remote host or locally on the current host (it does not support copying files between two remote hosts).
First, we need to enable the
rsync service on the Synology.
File Service and
Control Panel, go to the
Shared Folder and create a folder for saving our backup with appropriate permissions.
Backup our local folder
In general, the command for backup looks into the following way:
rsync -azP <source-folder-path> <synology-login-username>@<synology-ip-addr>:<dest-folder-path>
Let’s assume I want to back up the
Books folder from my Mac’s local
iCloud folder to the remote
bkps folder on Synology.
The full command will look into the following way:
rsync -azP /Users/myMacUser/Library/Mobile\ Documents/com\~apple\~CloudDocs/Books mySynologyUser@192.168.1.100:/volume1/bkps
/Users/myMacUser/Library/Mobile\ Documents/com\~apple\~CloudDocs/Booksis a local folder in iCloud
192.168.1.100Synology IP address in my local network
/volume1/bkpsremote folder on Synology for saving backups
-a, --archivearchive mode; same as -rlptgoD (no -H)
--progressshow progress during transfer
-z, --compresscompress file data during the transfer
If we need to copy/transfer only files to the remote folder without creating the
Book folder on the Synology, add a trailing slash after the
Books folder, like
More detailed explanations and examples from the
More documenation can be found via