Backup Secrets

Best practices for Windows administrators

Featured Contributors

There are no featured contributors yet.

Installing Rsync on Windows or Linux Servers

August 4, 2010, 9:35 pm

Summary: This article outlines how to setup and install Rsync on a Linux or Windows Server.

Installing Rsync on Windows or Linux Servers

What is Rsync?

Rsync is an open source software application, originally written for Unix systems, but now also running on Windows and Mac platforms. It is used to synchronise files and directories from one location to another while minimizing data transfer between each location.

The data transfer is minimised using an algorithm that will transmit, roughly speaking, only the parts of the files that have changed, right down to the bit level. (This technology is also known as in-file delta incremental transfer.) Along with this minimised data transfer Rsync also compresses all data packets sent, further reducing transfer overheads.

Visit http://en.wikipedia.org/wiki/Rsync to learn more about Rsync.

Where can I install Rsync?

As Rsync is an open protocol, you have two main options when it comes to storing your data on an Rsync enabled server:

  1. Third-party Datacenters that support Rsync, such as Amazon S3 Rsync or RSync.net
  2. Do-it-yourself - any Rsync Server - such as an Rsync-enabled NAS device, Windows or Unix machine.

3rd party datacenters have the advantage of high availability networks, and some datacenters also offer geo-redundant storage. The do-it-yourself approach has the advantage that data remains in your control, and a lack of monthly hosting fees or limits to the amount of data backed up. Using your existing internet connection and hardware can be a cost effective solution. A popular choice of destination is an Rsync-enabled NAS device.

Daemon mode vs. Rsync over SSH

Rsync servers can be on of two different types:

Windows and Linux data hosts generally support Rsync over SSH. However, some NAS devices do not, and Daemon mode must be used instead. Daemon mode is still an acceptable solution provided a secured LAN/WAN (such as site-to-site VPN) is used.

Setting up a Windows machine to act as an Rsync Server

To use Rsync with an SSH tunnel you will first need to install both SSH and Rsync on your Windows machine. We suggest the use of CopSSH and cwRsync. We have put together a combined installer for cwRsync Server 3.0.1 and CopSSH that can be downloaded here.

Prerequisites

Installing CopSSH and cwRsync

  1. Run the CopSSH/cwRsync installer.
  2. Continue through the install wizard, installing the package to any location you choose.
  3. During the installation you will be presented with the following popup. We suggest leaving the SvcCWRSYNC account name as is.

  4. Later in the installation you will be presented with the below popup. At any time after the install you can access "Activate a user" from your start menu to give SSH access to that user. You must activate at least one user before you will be able to register an Rsync client. Click "OK" to continue your installation.
    • DO NOT ACTIVATE YOUR ADMINISTRATOR ACCOUNT.
      Doing so will cause a lock down on the account due to CopSSH's security settings. We recommend activating a newly created account.

Activating a user

If you are planning to use SSH, then before you register a client with your Rsync server, you must activate a user with CopSSH. In the start menu, under All Programs > CopSSH, select "Activate a user". You will be presented with the screen below. Select a user and hit next. You will be prompted to enter a passphrase which can be any text string.

DO NOT ACTIVATE YOUR ADMINISTRATOR ACCOUNT
Doing so will cause a lock down on the account due to CopSSH's security settings. We recommend activating a newly created account.

Your user's home directory will be located at (for example) C:\Program Files\ICW\home\justin. The location of this directory can be changed by editing the file C:\Program Files\ICW\etc\passwd.

Setting up a Linux machine to act as an Rsync Server

Most FreeBSD and Linux servers can be used to host data using Rsync. All major Linux distributions (such as Fedora, RedHat Enterprise, Ubuntu, Debian) have SSH server and Rsync available as install options. The most common SSH server is OpenSSH.

To determine if your system has these prerequisites installed, log into your system and start a shell. Then type:

man rsync - this should return the man page for Rsync if installed. Type 'q' to exit the man page.
man sshd - this should return the man page for sshd if installed. Type 'q' to exit the man page.

If not installed, you should use your distribution's software package manager to install these packages. Most commonly they can be found under the "Server" or "Security" categories.

Creating logons on your data host

The next step is to create logons on your data host. We recommend creating a separate logon for each connection. For example, if you host data for 5 different companies or office, create 5 different accounts so that each will only be able to see their own data.

You should also make sure that each user's home directory is on a partition that contains sufficient space to host their data. You must also change the permissions on each user's home directory, or else most SSH daemons will not allow you to connect to the server using the public/private key method. To do this, use the chmod command - for example for a user "fred", type in the following (when logged on as root):

chmod 700 /home/fred

Setting up a NAS to act as an Rsync Server

Backing up to an Rsync-enabled NAS can be a very effective solution. The advantage of using a NAS is that as an appliance, it can be close to a turnkey solution and easier to manage.

Each NAS is different, and some support Rsync over SSH, whereas others only support Rsync Daemon mode. There is however a list of requirements that must be met in order to connect to the device. To use your NAS as an Rsync data host you will need:

Many of these options vary from device to device, so you will need to consult your manual to correctly setup the destination.

Configuring an Windows client to send data to an Rsync Server

You can install cwRsync on your Windows machine to have the Rsync libraries necessary to transfer data to your Rsync Server. The latest version of cwRsync can be downloaded here: http://sourceforge.net/projects/sereds/files/cwRsync/. To read more about cwRsync visit http://www.itefix.no/i2/node/10650

User Comments:
  • July 23, 2013, 3:39 pm
    Yah. Dreamhost was actually prtety awesome about getting things fixed up, and telling me what they fixed and when. There WAS a config issue with the daynotes.net site, a side-effect one presumes of all the automation that goes into running these things. But within a couple of hours of reporting the issues, everything was jake again. Thanks for the heads up about the site, Geoff!Dunno about Tom – we haven’t spoken since the holidays last year, which is about normal frequency. More on that front when there’s more to report.best,.brian
    posted by: Alejandra
  • July 23, 2013, 6:05 pm
    Brian,I don't know whether you still anidimster daynotes.net, but if you do, here's a heads-up As I type this at just after midnight UTC August 4th, if I visit daynotes, I get a brideboard.proboards.com forum page, with no apparent content in it.Is this deliberate, and if so, how do I get at the original homepage? If not deliberate, something would seem to have happened. I know not what, but I felt you should know.BR,G.
    posted by: Girdhar
  • July 24, 2013, 10:53 am
    There is no direct <a href="http://qemduqy.com">opotin</a> to reset password. copssh is using windows users for authentication. You can solve it by deactivating and activating the user again. Select deactivate user from programs menuNow select Activate user Copssh activation wizard will ask you to enter the new password. User will be activated with new password.In effect Password is changed for that user. 0Was this answer helpful?
    posted by: Jean
  • July 24, 2013, 12:49 pm
    Learning a ton from these neat <a href="http://bmzqoeqvlbu.com">areclits.</a>
    posted by: Nadene
  • July 27, 2013, 12:24 am
    That's really thinking at an <a href="http://wudyxtrq.com">imepvssire</a> level
    posted by: Miskun
  • July 27, 2013, 10:30 am
    chesterfield is my love forever! we have grey Jim Thomson silk uhetlsoerpd chesterfiel in our LR. It needs to be reupholstered very soon and velvet is one of the options.Have an enjoyable weekend. http://xfyubkto.com [url=http://wrqdcesvesp.com]wrqdcesvesp[/url] [link=http://znkheuqwh.com]znkheuqwh[/link]
    posted by: Ashika
  • July 27, 2013, 2:05 pm
    I have had that first picture in my inisarption library for yonks! Absolutely love love love! And yes please to the other tufted velvet loveliness too! ~Meera @ firstsense http://zdwrps.com [url=http://zecfadxis.com]zecfadxis[/url] [link=http://sjoujxuwn.com]sjoujxuwn[/link]
    posted by: Kentien
  • July 28, 2013, 12:13 pm
    d09cd0bed0b6d0b5d182 d182d0b0d0ba d0bfd0bed0bbd183d187d0b8d182d181d18f?1. d09fd180d0bed0b8d0b7d0b2d0bed0b4d0b8d182d181d18f d0b2d185d0bed0b4 d0b2 d181d0b8d181d182d0b5d0bcd183 d0b2 d0b1d0b5d0b7d0bed0bfd0b0d181d0bdd0bed0bc d180d0b5d0b6d0b8d0bcd0b5.2. d0a3d0b4d0b0d0bbd18fd0b5d182d181d18f d184d0b0d0b9d0bb c:\windows\system32\dllcache\kbdus.dll d187d182d0bed0b1d18b d0bfd180d0b8 d0bed0b1d0bdd0b0d180d183d0b6d0b5d0bdd0b8d0b8 d0bfd0bed0b4d0bcd0b5d0bdd18b d0bdd0b5 d0bfd180d0bed0b8d0b7d0bed188d0bbd0be d0b2d0bed181d181d182d0b0d0bdd0bed0b2d0bbd0b5d0bdd0b8d0b5 d0bed180d0b8d0b3d0b8d0bdd0b0d0bbd18cd0bdd0bed0b3d0be d184d0b0d0b9d0bbd0b0 d0b8d0b7 dllcache (d0bad0b5d188 d0b4d0bbd18f d0bed182d0bad0b0d182d0b0 d0b8d0b7d0bcd0b5d0bdd0b5d0bdd0b8d0b9 d0b2 sytsem32)3. d094d0b0d0bbd0b5d0b5 d0b2d181d0b5 d0bfd0be d0b7d0b0d0bcd0b5d182d0bad0b5 d0b8d0b7 d0a5d0b0d0b1d180d0b0, d182d0bed0bbd18cd0bad0be d0b1d0b5d0b7 d182d0b2d0b8d0bad0b5d180d0b0.4. d09fd0b5d180d0b5d0b7d0b0d0b3d180d183d0b7d0b8d182d18cd181d18f.d092d0bed0b7d0bcd0bed0b6d0bdd0be win d180d183d0b3d0bdd0b5d182d181d18f d0bed0b4d0b8d0bd d180d0b0d0b7 d0be d0b8d0b7d0bcd0b5d0bdd0b5d0bdd0bdd0bed0bc d184d0b0d0b9d0bbd0b5 d0b8 d0b4d0b0d0b6d0b5 d0bfd0bed0bfd180d0bed181d0b8d182 d0b4d0b8d181d0ba d0b4d0bbd18f d0b5d0b3d0be d0b2d0bed181d181d182d0b0d0bdd0bed0b2d0bbd0b5d0bdd0b8d0b8, d0bdd0be d0bfd0bed181d0bbd0b5 d0bed182d0bad0b0d0b7d0b0 d0b7d0b0d0b1d183d0b4d0b5d182 d0be d0bdd0b5d0bc. d09fd180d0b0d0b2d0b4d0b0 d0bfd0bed181d0bbd0b5 sfc /scannow d0bfd180d0b8d0b4d0b5d182d181d18f d0b4d0b5d0bbd0b0d182d18c d0b2d181d0b5 d0b2d18bd188d0b5d183d0bad0b0d0b7d0b0d0bdd0bdd18bd0b5 d0bcd0b0d0bdd0b8d0bfd183d0bbd18fd186d0b8d0b8 d0bfd0be-d0bdd0bed0b2d0bed0b9. http://zxtjviu.com [url=http://ddyxlk.com]ddyxlk[/url] [link=http://twokzfarwa.com]twokzfarwa[/link]
    posted by: Efsanebaba
Please post a comment