You already know how powerful rsync utility is on Linux platform.
One of the useful feature of rsync is that it can incrementally copy big files. i.e If you have a huge file (especially backups), that keeps changing every day, but you don’t need to copy the whole file. Instead using rsync, you can copy only the blocks that are changed (instead of copying the whole file again).
If you use the standard copy feature of Windows, you won’t be able to incrementally copy only the changed blocks.
Deltacopy is a Windows software that is a wrapper for the rsync program. You don’t need to install cygwin to get Deltacopy working. Deltacopy is an open source software.
This article explains how to setup and configure Deltacopy to perform rsync on Windows platform
1. Download and Install DeltaCopy
First, download the deltacopy, and install it.
2. Register DeltaCopy a Windows Service
Once it is installed, launch the DeltaCopy Server, which will display the DeltaCopy Server Console window. Click on the ‘Register Windows Service’ to register this as a windows service. At this stage, the “Start Server”, and the “Stop Server” button will be disabled.
This will prompt you to enter your windows username and password to register the service as shown below.
Once you enter the windows username and password, it will display the message “Service created successfully”.
3. Start DeltaCopy Server
Now the “Start Server” button will be enabled. Click on this to start the DeltaCopy Server.
You might get “Could not start the service. The service could not be logged on. Check user id and password specified for login” message, if you’ve specified invalid credentials. You also might want to run this service as “Local System” to fix this issue.
Go to “Control Panel” -> Administrative Tools -> Services -> Select “DeltaCopy Server” -> Right mouse click -> Select “Properties” -> Go to “Log On” tab -> Select “Log on as: Local system account”, as shown below.
Now, click on “Start Server” from the DeltaCopy Server Console, which should start the server. Once the server is started the “Stop Server” button will be enabled as shown below.
4. Create Virtual Directory
Now, let us setup the virtual directory on the server side, which will be used by the client, when they connect to it to perform rsync.
From the DetalCopy Server Console, click on “Virtual Directories” tab -> Double-click on the “”, which will display the following window, specify an alias name for this virtual directory. In this example, I gave “MyPictures” as the alias name.
Now, select the “MyPictures” alias name, and specify a corresponding directory for this alias, by clicking on the ‘Browse’ button in the path. I selected the “C:\Users\ramesh\Pictures”.
If you want clients to specify a username/password to access this particular virtual directory, click on “Use Authentication” check-box, and specify a username password. Whatever username and password combination you specify here should be used from the DeltaCopy client.
5. Setup DeltaCopy Client
Typically you’ll install DeltaCopy server on one Windows system, and DeltaCopy client on another windows system, and perform rsync from Windows client to Windows server.
However, for testing purpose, let us launch the DeltaCopy client from the same machine where the server is installed and see how it works. When you installed the DeltaCopy as explained above, it installs both server and client.
Launch the DeltaCopy client, and click on “”, which will display the following window.
- Enter “myclient” in the profile name.
- Enter “localhost” for the server name.
- Click on the “…” button that is located next to the “Virtual Directory Name” drop-down list, this will connect to the server (in this case localhost), and get all the available virtual directories and populate the drop-down list. You’ll see the “MyPictures” virtual directory that we created from the previous step, select that.
- Click on “Test Connection” button to make sure everything is working properly.
- Finally, click on “Add Profile.
For testing purpose, create a folder “C:\temp” and add a test file in this folder. We are going to sync this folder (assuming that this is from client), to the “MyPictures” profile on the server (which is “C:\Users\ramesh\Pictures” on the same machine in this example).
Click on “Add Folder” and select “C:\temp”. If you want to add individual files to this “myclient” profile, click on “Add Files”.
If you want to execute this “myclient” profile (i.e to perform this rsync) at certain interval, click on “Modify Schedule” and set your schedules accordingly. This is the standard Windows scheduling functionality.
If you want to execute this immediately, select the “myclient” profile -> Right mouse click -> and select “Run Now” as shown below.
This will pop-up the status window as shown below, which indicates that this called the rsync.exe to execute the rsync and the files for successfully synced. i.e The “C:\temp” folder is now copied over (synced over) to “C:\Users\ramesh\Pictures”.
In this article we showed how to perform rsync on the same machine. However, as explained earlier, you can install DeltaCopy Server on one system, and DeltaCopy Client on another system, and perform rsync between Windows server using the same procedure as explained above. You can also sync from Windows to Linux by connecting from the DeltaCopy client that is running on Windows to a remote Linux server.