Monday, 25 August 2008

rsync on the QNAP TS-101

rsync is a useful application which synchronizes files and folders between devices. The QNAP TS-101 supports this (with a bit of fiddling).

Setting up the QNAP
On the QNAP, go to the "Remote Replication" page, and turn on "Allow remote Rsync server to back up data to NAS". ("Enable backup from a remote server to the local host." should already be set, and the port should be the default of 873)

Fixing rsyncd.conf

Unfortunately, there seems to be a problem with the rsync configuration file - the master user is set as "admin" which doesn't exist (the root user on the QNAP is "administrator").

To fix this, edit /etc/rsyncd.conf and change: -

uid = admin


uid = administrator

Listing Remote Folders

To check that rsync is allowing connections, go to your client and enter: -


You should get something similar to the following: -


Backing up a directory

To back up a directory, its a simple matter of issuing an rsync command. For example: -

rsync -vrltz --progress --password-file=password.txt --delete --exclude-from=excludes.txt "/cygdrive/C/users/windows_user/Documents/" "qnap_user@"

where: -

password.txt is a file containing your qnap password
excludes.txt is a file containing files not to synchronize
C/users/windows_user/Documents is the folder to copy
qnap_user is a QNAP user that has access to the remote folder is the IP address of the QNAP device
qnap_folder is the destination

No comments:

Post a Comment