I just copied this post from http://taksuyama.com, I use it for my personal reference.

– Because it matters – http://taksuyama.com –

BackupPC SetUp: with rsyncd on Windows XP without Cygwin

Posted By tak On September 8, 2007 @ 10:31 pm
BackupPC Set-UP with rsyncd on Windows XP

This page is for the Windows client. “Client” is the computer being backed up by the server.

This is an executable of ‘rsync’ (a Linux program) that is accompanied by the DLL of Cygwin (a software that allows Windows to run Linux things).
Pre-requisites

* Windows XP
* IP address
* List of folders you want backed up OR…
* List of folders you don’t want backed up
* ~15-20 min of your time
* You do not have Cygwin installed (and you will NOT).

WARNING: If you currently have Cygwin installed or are planning on getting it, these instructions may break your Cygwin software. In that case, you must either install ‘rsync’ through Cygwin. Please see the [1] other set of instructions.

1. Download the software package (zip)

Get it here!
Sourceforge.net (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:

UUU:PPP

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:
auth users = username, backuppc
hosts allow = xxx.xxx.xxx.xxx

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
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’

read only = true

4. Change the Permission

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

C:\rsyncd\rsyncd.secrets

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
IF YOU’R USING WINDOW7 you need to press CRTL+Shift+Enter (not just enter)
type ‘cmd’ and press enter. In the terminal,

cd \rsyncd
Then,

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.
cleintname.pl 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.

For the ‘$Conf{RsyncShareName}’ item, leave it as it is if you have not done the optional modification in the ‘rsyncd.conf’ file (see above). But change it to ‘docs’ if you have.

Also change the IP address in the $Conf{ClientNameAlias} section to your IP address.
Save the above file as ‘clientname.pl’ where ‘clientname’ is the name of your computer.
You can find your computer name by:

Control panel –> System
Then send this file to the administrator and nicely ask them to place the configuration file on the server ASAP.

Having Multiple Directory Paths

Find the following section at the end of the ‘rsyncd.conf’ file, copy and paste it at the end of the file (so as to have duplicates of the entire section).

[cDrive]
path = c:
comment = Entire Drive
auth users = UUU
secrets file = c:/rsyncd/rsyncd.secrets
hosts allow = 172.16.0.17
strict modes = false
read only = true
list = false

Then change the section name within the bracket (ie [cDrive]) for the newly created (pasted) section(s).
You can change it to whatever you like, but no space please.
Modify the bolded items according to the descriptions above (note that these entries are exact copies of the main section of the rsync.conf file; they just don’t have the # comments sections).
Now change the $Conf{RsyncShareName} = ‘cDrive’; section of the ‘clientname.pl’ file to the following format.

$Conf{RsyncShareName} = [‘cDrive’, ‘docs’, ‘name_you_made_up’, ‘another’];

Note that these entries are supposed to be the same as the names in [] in the rsync.conf file.

8. Connect & Back-up!

After you have heard back from the administrator, do the following to connect. Bookmark the address below and go to it;

http://xxx.xxx.xxx.xxx/backuppc

Now a pop-up window will ask you for the username and password. These are the ones the administrator gave you.

You should see something similar to below:
screenshot

Click on ‘Start Full Backup’ button to start your first backup. Note that this first backup will take a while. The next time you back up, it will be an ‘incremental’ backup and should only take a few minutes.
If you get any error messages, let the administrator know of that message

9. Retrieve backed-up data

To restore files / folders, simply click on ‘browse backups’ link on the left menu.
screenshot

You should see a screen like the above.

Then click the checkboxes next to the files and folders you want to restore and click on ‘restore selected files.’

Once you click on ‘restore selected files,’ a screen like the below should show up. There are 3 options to what to do with the files / folders you’ve selected.
screenshot

* Option 1: Direct Restore
* Option 2: Download Zip archive
* Option 3: Download Tar archive

Option 1 will write the backed up files / folders to your harddrive (if the same file is there, it will overwrite).

Option 2 and 3 will archive the files / folders and let you download the archived package as .zip or .tar respectively. This feature has other potential uses than just backup / restoration; you can access the backed up files / folders from anywhere in the world!

To do a complete system restoration, follow the same direction as above for all files & folders through [2] KNOPPIX or something equivalent.

[3] BackupPC Manual Start Page

Article printed from Because it matters: http://taksuyama.com

URL to article: http://taksuyama.com/how-to/set-up-backuppc-in-a-mixed-os-environment/backuppc-setup-with-rsyncd-on-windows-xp-without-cygwin/

URLs in this post:
[1] other set of instructions: http://taksuyama.combackuppc_winxp_cyg.html
[2] KNOPPIX: http://www.knopper.net/knoppix/index-en.html
[3] BackupPC Manual Start Page: http://taksuyama.com?page_id=5