Saturday, November 14, 2009


How to set up backuppc in windows client

Posted in

1. Download the software package (zip)

Get it here! (get the 'zip' package)

2. Unpackage it

make a folder named 'rsyncd' in C:

unzip the content into C:\rysncd

3. Edit Configuration Files

1.) rsyncd.secrets file

Located at C:\rsyncd\rsyncd.secrets

The file should look like this:

# The format of this file is user:password. You can have as many entries
# as you wish. These accounts are sepecifc to the rsync daemon and share
# no relation to Windows local/domain accounts, nor Cywin entries in the
# passwd file.
# SECURITY WARNING: Don't use these defaults of UUU for the user name
# and PPP for the password! Change them!!
# Also: make sure this file ends in a newline. Otherwise the last
# username/password pair will be ignored.

Read the instructions. As it says, make sure that the last line is a new blank line.Replace 'UUU' with a username (no, it does not code for phenylalanine).
You can just make up this username. Replace 'PPP' with a real password (should at least have numbers and alphabets).
2) C:\cygwin\rsyncd.conf File
Required modification:

Find the following section:

# What user(s) have access to this module. The user(s) must be
# defined in the secrets file. A comma or space separated list.
# Example:
# auth users = backup, root, larry
# auth users = backup root larry
auth users = username, backuppc

Where it says 'auth users = .....', replace any existing name(s) with the username that you placed in 'rsyncd.secrets' file AND add the user 'backuppc' (as shown in the example above).

Also find the following section in the file.

# What hosts are allowed access to this module? By default, all
# hosts are allowed access. If you wish to further strengthen
# the security of your setup, uncomment and replace with the IP
# address your BackupPC server. This is a flexible setting and
# can be one of:
# a dotted decimal IP address:
# a address/mask in the form a.b.c.d/n:
# an address/mask in the form ipaddr/maskaddr:
# a hostname: backupserver
# a hostname pattern using wildcards: backup
# hosts allow =

hosts allow =
IMPORTANT: Make the same modifications for the variables shown at the end of the file. ie for
  • hosts alow
  • auth users
Optional Modifications.

By default, the backup software will back up practically everything in your 'C:\Documents and Settings'folder. If you want to specify the

folders to be backed up, find the following section and modify.
# Exact DOS style path to the file or directory to be rsync accessible
path = c:/Documents and Settings
# A short description of the module. This is what is printed when
# using rsync to 'browse' the server for what modules are available.
comment = Documents and Settings

Note that the slash is forward (not backward).
Also note that everything inside the specified folder will be backed up. However, you can exclude certain folders by specifying them on the

config file on the server; you can let the administrator know what folders to be excluded.
Moreover, you can only specify one path here (to specify multiple paths, see below). Here is an example,

path = c:/stuff/important_stuff/really_important_stuff
The 'comment' should only be 1 line. It would be a good idea to write this description for future reference
Automatic Restoration - if you would like BackupPC to automatically restore files on your computer (ie the backup server has the privilege to
write to your computer), then you must turn on this option (it's off by default). If you are planning on backing up system files so that you can restore the system (not just the data), this may be a good idea.
Otherwise, you will have to download the desired files/folders from BackupPC and manually restore them.

To turn on the option, find the following section and change 'true' to 'false'

# Only allow clients to READ from the server. This prevents uploads
# from remote machines. If you wish to allow uploads, change this too
# "true".
# WARNING: Setting this to true means that BackupPC restores via
# rsyncd will fail. You most likely want to set this to "false".
read only = true

4. Change the Permission

Now we want to make the 'resyncd.secrets' file read-only.

To do this, right click the file and choose 'Properties.'

Check where it says 'Read-Only'

5. Set Up rsyncd Service

Next, set up the rsync job as a service to be started at boot-up.
Click on Start --> Run
type 'cmd' and press enter. In the terminal,
cd \rsyncd
cygrunsrv.exe -I rsyncd -e CYGWIN=nontsec -p c:/rsyncd/rsync.exe -a "--config=c:/rsyncd/rsyncd.conf --daemon --no-detach"
the second command is a long one liner. You must issue these commands without any misspelling.
To test to see if the above command was properly issued,

Go to Control Panel --> Administrative Tools --> Services

Find 'rsync' and click on 'start' to see if the service starts properly.

6. Open a Port

Finally, open a port for rsync in the firewall.
Control Panel --> Firewall --> Exceptions

  • Name: rsyncd
  • Port number: 873
  • Type: TCP

7. Submit config files to Administrator

Now the final step is to create and submit configuration files to the administrator. file

Copy and paste the following in Notepad:

# Tell BackupPC we wish to use rsyncd: requires rsync to be running as
# a service/daemon on the client system
$Conf{XferMethod} = 'rsyncd';
# Tell BackupPC which user name and password to use. This should
# match the userName:password pair in the C:\rsyncd\rsyncd.secrets
# file on the client.
$Conf{RsyncdUserName} = 'username';
$Conf{RsyncdPasswd} = 'password';
# Tell BackupPC which share to backup. This should be the name
# of the module from C:\rsyncd\rsyncd.conf on the client (the
# name inside the square brackets). In the sample rsynd.conf
# file the cDrive module is the entire C drive.
$Conf{RsyncShareName} = 'cDrive';
# Link the IP address to the host name
$Conf{ClientNameAlias} = 'XXX.XXX.XXX.XXX';

Now change the bolded items; username and password.