Backup Windows files into a Ubuntu file server via rsync

I have a Linux file server on Ubuntu 8.10 (Intrepid Ibex) running a rsync daemon, and a Windows server running a freeware rsync GUI called DeltaCopy. I wanted an automated, incremental backup every weekend.

Configuring the Ubuntu machine is pretty straightforward. Install and configure rsync and xinetd

There are a couple of changes from the rsyncd.conf you get from the URL above, mainly to avoid permission related problems when trying to rsync from a Windows machine. Here is my complete rsyncd.conf

uid = backups
gid = nogroup
use chroot = yes 
max connections = 5 
pid file = /var/run/rsyncd.pid
log file = /var/log/rsync.log
incoming chmod = Dg=s,Dug=rwx,Do-rwx,Fug=rw,Fo-rwx

[wbackups]
        path = /home/backups/wserver
        comment = Backups from wserver
        read only = false
        auth users = backups
        secrets file = /etc/rsyncd.secrets
        hosts allow = 192.168.1.1

Changes to note from the Ubuntu Wiki example is the “incoming chmod” line and the “auth users” line. I created a separate user called “backups” and store everything under /home/backups. Next, I notified logrotate about the new log being created. To do this, create a file /etc/logrotate.d/rsync with the following:

/var/log/rsync.log {
       weekly
       rotate 4
       compress
       notifempty
       missingok
}

And that is about all you need to do on Ubuntu.

On Windows:

  1. Install DeltaCopy
  2. Run the DeltaCopy Client, point it to the Ubuntu machine
  3. For “Virtual Directory”, my setting was wbackups, defined in the configuration file above
  4. Authenticate as the backups user you created
  1. Set your rsync options

The rest should be straightforward. The DeltaCopy GUI also allows you to automatically schedule backups.

  • Share/Bookmark

Leave a comment

Your comment