Running rsync as a daemon

Adapted from http://www.jveweb.net/en/archives/2011/01/running-rsync-as-a-daemon.html

Environment: Lubuntu 14.04, QNAP TS-431

The first step in order to create a powerful backup facility with Time Machine like functionality requires that you run an rsync daemon on the machine to be backed up.

Create /etc/rsyncd.conf

In this case the foobarHome and foobarMusic sections are known as modules and foobarHome and foobarMusic are the module names. The module names are important and used when remotely connecting to the rsync daemon.

Create /etc/rsyncd.secrets

Secure /etc/rsyncd.secrets

Enable the rsync daemon

Edit

and enable by changing RSYNC_ENABLE to true. Optionally change the NICE values

Start the rsync daemon

Connect to the rsync daemon

To connect to the rsync daemon, specify a module name as set up in the rsyncd.conf file. You may append file paths to the module name

Samba, linux and QNAP

OS: Lubuntu 14.04
NAS: QNAP TS-431

Here is the procedure that worked for me to access Samba shares published from your QNAP NAS.

Enable SAMBA on the NAS

From the web UI to the NAS, go to

and select the Microsoft Networking tab. Make sure that the “Enable file service for Microsoft networking” is checked. Set the workgroup to match the workgroup setting on all of your Windows boxes. For me, that is WORKGROUP. Click the Advanced Options button and set the “Highest SMB version” to the highest value, which for me was SMB 3.0. Note that this may not be necessary, as the default is SMB 2.1, which may work fine. I have not tested with that. Click Apply

Install cifs-utils on your Linux box

Create an SMB credentials file on your Linux box

In your home directory create and edit .smbcredentials and add the following

you can use the NAS default admin user account as the user

Add mounts to /etc/fstab on your Linux box

Edit /etc/fstab as sudo and add the following lines to the bottom

You can create as many mounts as you want. For example, I created a directory under /homes on the NAS and then mount that as /mnt/backup and backup my laptop to that share.

Mount the new mounts