Click here to Skip to main content
1,837 members
Articles / Windows
Technical Blog

Windows Server Backup

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
25 Apr 2012Apache 6.4K  
How to make incremental backups from Windows to Linux using free tools

A few days ago I was confronted with the problem to automatically backup some data directories once a day. I was looking for a free solution, but all I found where solutions that do a full backup every time. That would be very space consuming, so I was looking for a solution that can do incremental backups.

But there was nothing for Windows with support for incremental backups AND without paying a fee. I know there are many commercial solutions, but generally they are hard to afford for a small company. After a few commercial windows solution I looked deeper into some Linux solutions and finally got to rsnapshot.

rsnapshot uses rsync to synchronize with the remote directories. It also supports incremental backups by using the well known hard links of the linux universe.

The backup process works as follows (assuming there already exists at least one backup):

  1. The last backup folder is copied with hard link option. So every file in the folder is just a hard link, this consumes minimal disc space.
  2. The new folder is rsynced with the remote folder. Changed files get overridden (the hard link gets deleted, but the file still exists in the old backup folders)

This seems like a perfect solution, but not for windows. There exists a port to Cygwin, but then the hard links would be created on an NTFS partition (yes ntfs supports hard links) but they have a different behaviour when copying or deleting those files, so i decided to use a Linux backup box with ext2.

But how to sync from Windows to Linux? Just install rsync server on the Windows box (cwrsync) and share the data folders.

So my current backup solution looks as follows:

  • Windows server box with cwrsync server running(see cwrsync_conf.txt)
  • VMWare Server 2 on Windows Server with minimal Debian System (backup box).
  • NAS attached to backup box 
  • rsnapshot run by cron daemon every evening (see rsnapshot_conf.txt for relevant parts)

The relevant lines in crontab look as follows:

00 21   * * *   root    rsnapshot daily
00 3    * * 1   root    rsnapshot weekly

If you have further questions, leave me a comment.

License

This article, along with any associated source code and files, is licensed under The Apache License, Version 2.0


Written By
Student
Austria Austria
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --