GNU/Linux, Open Source, Cloud Computing, DevOps and more...

Perfom Windows backups using rsync and DeltaCopy Server

3 comments

Rsync and Windows?

Many corporate and heterogeneous networks use the rsync protocol to perform server backups or to keep files synchronized automatically from one or more directories on different machines. Linux natively incorporates the rsync utility and other associated tools, but what do you do when you need to backup Windows folders automatically from a NAS or a remote machine? One option could be to use Samba to read the contents of those folders from Linux, but it would be a fairly complex solution, because it would force us to configure Samba on the server side, set the various permissions and configuration options in Windows and place both machines on the same local network or configure complex rules on our firewall to allow SMB/CIFS traffic. And yet, the file transfer through the network would not be safe, because it would be made text clear with no encryption.

Rsync backup through network

There exists a simpler solution consisting in leveraging the flexibility and security SSH provides and the simplicity and reliability of rsync to synchronize files across the network. Just need to set up an SSH server on your Windows computer and install the DeltaCopy Server software, which will serve as an rsync server.

DeltaCopy Server

DeltaCopy Server is set to listen on port 873 to serve requests for file synchronization in the same way the rsync daemon does.

Windows rsync listening on port 873

We need to start it as a service running in the background via the main configuration console.

DeltaCopy configuration console - start server

Finally, simply specify the virtual directories that contain the files you want to synchronize, wich will be the only visible ones from the rsync client. We have the ability to set these virtual directories as read-only to prevent them from being changed from outside and also to establish a username and password, but it won’t be necessary if we use SSH as authentication mechanism.

DeltaCopy Virtual Directories

Command to run from the rsync client

Once you have everything set up on Windows only one thing would be to finish. Just run the appropriate command to synchronize the contents of the virtual directory on the client computer that will be responsible for performing backups, being 192.168.0.20 the Windows box, aeat the virtual directory and /var/data/backups/aeat the target directory where the synchronized files will be stored on the computer running rsync:

$ rsync -avz --delete-before 192.168.0.20::aeat /var/data/backups/aeat/

We can even use some more advanced solutions for backup like rsnapshot or rdiff-backup, since both operate on rsync.



 

About the author

Daniel López Azaña
Cloud Solutions Architect

Entrepreneur, a generator of ideas and restless mind. Passionate about new technologies, especially Linux systems and Open Source Software. I also like to write about Technology News, Cloud Computing, DevOps, System Security, Web Development and Programming, SEO, Science, Innovation, Entrepreneurship, etc.

DanielPerfom Windows backups using rsync and DeltaCopy Server

Related Posts

3 comments

Join the conversation
  • Indika - 16/06/2017 reply

    Hi Daniel López Azaña,
    I need to configure the rsync on windows server. can you please help me

    Daniel - 16/06/2017 reply

    Sure, tell me the problem, please.

  • JACK REACHER - 30/11/2017 reply

    nice article

Leave a Reply

Your email address will not be published. Required fields are marked *