Installing and Running Rsync


This post is very long, so I have broken it down into multiple pages.
Page 1 – Installing rsync daemon on your server
Page 2 – Installing rsync client on your PC
Page 3 – Scheduling rsync automatically
Page 4 – Errors I encountered and their solutions

Download and build rsync from source

  • Start a SSH session to your server
  • Download the source from samba wget
  • Extract the source code gunzip -c rsync-2.6.9.tar.gz | tar x
  • Change into the directory so that we can build the software cd rsync-2.6.9
  • You will need the GCC compiler installed if you have not already done so.
  • Run the auto configure script so that the server can work out if everything necessary is present ./configure –prefix=/usr/mylocal –with-included-popt >log.config 2>err.config
  • Check that no errors were logged by the configure script less err.config
  • Build the application make >log.make 2>err.make
  • Check that no errors were logged during the build process less err.make
  • Install the application make install >log.install 2>err.install
  • Check that no errors were logged during the installation less err.install

Configure the rsync daemon

We cannot use the default port (873) on Westhost as this is used by Westhost’s own application for nightly backups. Nor can we use ports below 1024 as these require us to run as root. However, ports 8730-8732 are unassigned by IANA (Internet Assigned Numbers Authority), so we can use any of these.

  • Create a directory for your configuration files. mkdir /etc/rsyncd
  • Create a new configuration file pico /etc/rsyncd.conf. The configuration file consists of a general configuration section which applies to every module and one (or more) modules. Each module starts with its name in square brackets, for example [rsyncd_module].
    This sample configuration file will allow upto 3 rsync clients to read the contents of /ftp/pub/rsync PROVIDED that they authenticate themselves by providing the correct credentials AND their IP Address is in the range specified by hosts allow. The connection will close down after 5 minutes (300 seconds) of inactivity.

    #Global definitions
    #Message of the Day
    motd file = /etc/rsyncd/rsyncd.motd
    log file = /var/log/rsyncd.log
    pid file = /var/run/
    lock file = /var/run/rsyncd.lock
    port = 8730

    #Module Options begin here
    path = /ftp/pub/rsyncd
    comment = My Very Own Rsync Server. This area is ReadOnly
    max connections = 3
    timeout = 300
    uid = myuserid
    gid = vuser
    read only = yes
    list = yes
    auth users = rsync_user
    secrets file = /etc/rsyncd/secrets
    hosts allow =
    hosts deny = *

    Replace the module name, myuserid, vuser and rsync_user as necessary for your system.
    If you want to limit those who have access to your rsync server, then specify the “auth users” and “secrets file”. If you want to restrict where they can access the rsync server from, then you will also need the “hosts allow” and “hosts deny” variables. The value for “hosts allow” should be set to your IP address if you use a static IP (example or the range if you use a dynamic IP (example Multiple possibilities can be separated by a space. If you don’t understand this bit, then leave “hosts allow” and “hosts deny” out of your configuration for now.

  • Create the secrets file pico /etc/rsyncd/secrets. Format is username:password in plain text, one user per line. If you want to communicate over SSH, then ensure that one of the users is your account’s user id; it need not have the same password here as for logging in.
  • The secrets file must not be readable by other users, so change the access rights by using the command chmod 600 /etc/rsyncd/secrets
  • Create your Message Of the Day file pico /etc/rsyncd/rsyncd.motd. This text will be displayed when a connection is made to your server.

Notepad alternatives

There are two main categories of Notepad replacements. The first category provides the same functionality as Notepad, but in a tabbed environment, allowing you to open multiple documents in a single window (in the same way as Firefox, Opera or IE7 internet browsers). Crimson Edit, PSPad and NoteTab are editors which fall into this category. UltraEdit and EditPlus are also contenders, although they are no longer Freeware.

My personal favourite in this category is Crimson Editor, although PSPad is useful for developing code and comparing documents.

The second category is note taking applications such as EverNote, KeyNote and TreePad. Despite the fact that KeyNote has not been developed since 2003, it is fine for simple note taking using a tree like structure to categorise your notes. It also offers better formatting options (numbered and bulleted lists) than Treepad. Treepad looks fresher as it is still being developed. However, its Lite version seems to be very limited, even being restricted to a single top-level node. EverNote has many more features, such as to do lists and checkboxes as well as the ability to categorise your notes in multiple categories. However, I found its clipping feature (which is is beta at the moment) to be very buggy. For example, copying the list of files in a directory resulted in multiple imstances of Explore opening up and it trying to run any executables it found.

If you get the error

Cannot save to EverNote base.  FILE_SHARING_ERROR

followed by

Cannot create Web clip.  Unspecified error

when using the Evernote WebClipper for Firefox extension, then make sure to close the EverNote window before clipping your web content and try again. This error existed in version

Alternatively, if you get the popup

Can't clip

and the error

You either didn't select anything or the application you are trying to clip from  doesn't support copying information onto the system clipboard.  Try screen capture instead.

when using the Universal Clipper, but you are able to paste the web clip by going to another application such as Wordpad and pasting it, then the problem is possibly that the Universal Clipper cannot locate the database. This is normally located in

My Documents\\My EverNote Files\\DataBases\\EverNote.enb

. This bug existed in v1.0.0.32.

Memory Problems :(

I recently purchased a 2GB Kingston Memory MMC card for my Nokia 6230i phone, but when I formatted it on the phone I could only copy 768MB of data to it. Believing that the phone only understood FAT, I tried formatting the card using a different cluster size (32k and 64k), but this made no difference.

The answer was to format the card using FAT32. Simple when you know how :)

Configuring MS-DOS applications under XP

If you want to run certain applications, you may need to create a different
environment. To create custom startup files for an MS-DOS-based program
that may require a special configuration

  1. Using a text editor, such as Notepad, edit the Config.nt and
    Autoexec.nt files (located in systemroot\System32).
  2. Save each file with a new name.
  3. Right-click the MS-DOS-based program shortcut , and then click
  4. Click the Program tab, and then click Advanced.
  5. Under Custom MS-DOS initialization files, type the new names for your
    custom startup files.


  1. This procedure might be required because some MS-DOS programs use special memory and video instructions, or require that other programs be installed prior to their being started. Please refer to the documentation that came with the program before creating startup files.
  2. Use the documentation that came with the MS-DOS-based program to create a shortcut. For more information, click Related Topics.
  3. This option might not be available on some MS-DOS-based programs.
  4. To use custom startup files when starting an MS-DOS-based program, you must start the program from its shortcut.
  5. Creating a program information file (PIF) for an MS-DOS-based program creates a shortcut to the program executable. All the settings saved in the PIF file are contained in the shortcut.