Really fast incremental backup on Synology NAS from a Mac

UPDATE – I am using a Synology DS107 as my preferred network-attached storage device. The Synology devices have a lot of easy-to-use features (probably as a lot of other current models from LaCie or other manufacturers), such as streaming your music to wherever you are (iTunes, Web or UPnP streaming), giving access to your files (using FTP, Samba/SMB file share or other protocols) and acting as a reliable backup device. However, the classical ways to backup your Mac or other computers via copy and paste software like iBackup are all very slow and not reliable. Rsync may help you.

Typically, you’d connect your Mac to a NAS using the SMB/Samba, CIFS or Apple File Protocol (AFP) by clicking on Finder | Go to | Connect to server and then typing something like smb://, whatever the IP address of your NAS is.

The big downside is performance with such protocols: an incremental backup which requires to compare file time stamps between the SMB-mounted drive and the local drive needs a lot of time and also is a potential trap for synching errors.

All Unix-based systems such as the Mac and also the Synology NAS drives have the best solution already on-board: rsync. Rsync is a command-line tool which performs incremental backups by comparing timestamps – and this between all sorts of attached drives: SMB-mounts, AFP, and also straight via the IP network.

Option 1 – the slow one, using a mounted device

If you’re mounting the NAS in the finder as described above, you’ll get access to the NAS in a terminal window by:

cd /Volumes/public

Synchronizing now the mounted drive with your local folders using rsync could look like this:

rsync -a /Users/joedoe/Documents /Volumes/public/

Most of the regular Mac software uses this method to synchronize folders, such as iBackup. It is slow, you cannot see the progress properly, nor which files create problems when backing up.

Option 2 – rsync using server connection – the fast way

Since Synology has a running rsync daemon, you can use rsync on your Mac accessing the server not via file protocols but using rsync-specific protocols: much faster, much more elegant. To do this you should make sure that you have a firmware on your Synology NAS greater than 832 (DiskStation Manager 2.1 or higher) and use the iconv argument – only then a proper handling of special characters (such as German Umlauts ö,ä,ü) is granted.

The rsync command to be used looks like this:

rsync -a –iconv=UTF8-MAC,UTF8 –progress /users/joedoe/Documents admin@’/volume1/public/’

To make character conversion work properly you have to add a line to the rsyncd.conf file. Use telnet to log into your DiskStation and then edit the file /etc/rsyncd.conf using the editor vi. Add the line “charset = utf – 8”, and then restart your DiskStation.

Unfortunately, Apple has not yet updated the rsync client to its newer version supporting the iconv argument. Thus, search for rsync installer package in the Apple Downloads section at . UPDATE– The package is no longer available but you can compile the newest rsync with iconv option as follows. For this, make sure that you have installed Apple XCode (free) from the App Store, and then after having launched Xcode, you also need to install the so-called command line tools. You can do this in XCode under Preferences > Downloads:

Download and unarchive rsync and its patches
cd ~/Desktop
curl -O
tar -xzvf rsync-3.0.7.tar.gz
rm rsync-3.0.7.tar.gz
curl -O
tar -xzvf rsync-patches-3.0.7.tar.gz
rm rsync-patches-3.0.7.tar.gz
cd rsync-3.0.7

Apply patches relevant to preserving Mac OS X metadata
patch -p1 <patches/fileflags.diff
patch -p1 <patches/crtimes.diff

Configure, make, install in 32-bit (otherwise –iconv does not enable)


CFLAGS=-m32 CPPFLAGS=-m32 CCASFLAGS=-m32 ./configure

sudo make install

Verify your installation
/usr/local/bin/rsync --version
rsync version 3.0.7 protocol version 30
Copyright (C) 1996-2009 by Andrew Tridgell, Wayne Davison, and others.
Web site:
64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
append, ACLs, xattrs, iconv, symtimes, file-flags

Then use the installed rsync version, e.g. by referring to /usr/local/bin/rsync.

The great thing: the –progress argument lets you see each file copy, its progress and the speed. You still need to type in your login password for the server – should you want to run the backup in a script and don’t want to hardcode the password in your script file, you can work with SSH key pairs. Check out this article on how to install SSH keys on your DiskStation.

For me it works much smoother than iBackup and all the other tools, does not hang or create any errors harming the backup process. Check it out, it works like charm for me!

Tags: , , , ,


  1. Diesel McFadden

    This is terrific. Can’t believe it’s still easiest to use the command line, but there it is.

    Thanks so much.

  2. Hello,
    I wanted to do exactly the same configuration as you to back up my mac on my syno (DS109).
    The compilation on the syno works fine. On the mac, you method is ok. But I want to add to rsync the patch “detect-renamed.diff” that gives the option –detect-renamed : it is tremendous in the case of renaming important number of file, for instance when you rename the root folder of all your photos… This is cool but the patch doesn’t work if I first add as you mention “fileflags.diff” and “crtimes.diff”. Everything is ok if I patch only with “detect-renamed.diff”
    ==> can you explain the reasons for using “fileflags.diff” and “crtimes.diff” on mac ? is it really compulsory ?

    Many thank’s


  3. Great tip!
    Many thanks for sharing.
    It is working, but I can’t seem to be able to use the –iconv option: I get an “unknown option” error message.

    I have done everything as explained without any problem, and running rsync –version does show iconv in the capabilities list.

    I cannot figure out what is going wrong…


  4. Strange – are you sure you are starting the newly installed rsync and not the pre-installed one?

  5. I get the following error when using the newly installed rsync on my latest MAc OS X 10.6.x Snow Leopard. Any idea where the problem is?

    imac-wlan:rsync-3.0.7 username$ /usr/local/bin/rsync -a –iconv=UTF8-MAC,UTF8 –progress /Users/Shared/Music/iTunes/‘s password:
    rsync: link_stat “/Users/username/Desktop/rsync-3.0.7/–iconv=UTF8-MAC,UTF8” failed: No such file or directory (2)
    rsync: link_stat “/Users/username/Desktop/rsync-3.0.7/–progress” failed: No such file or directory (2)

    However, the file transfer is started but it seems not with the right parameters used due to this failure refering to the source folder on my desktop. all compilation went well. I have latest Xcode 4 installed, however, I am not a developer nor a real UNIX guru when it comes to compilation problems.

    Any help would be highly appreciated. Thx.

    Greetings from Germany,


  6. Your rsync description is great. I have discovered an SSH bandwith limit in synology nas devices. The SSH bandwith is limited to 100mbit/s around 12 mbyte/sec. So the large file transfer is not very effective with rsync. How do you sync we can get rid of this bandwith limit? Where do you think it is set?

    Best regards,

  7. I did not realise any bandwidth limit – if you find out where to configure it, please let me know!

Leave a Reply

Your email address will not be published. Required fields are marked *