archive :: stuff :: Part I

Some time back I was asked to set up a way to archive images from a PC (running WinXP Pro). An attached high-quality scanner was used to collect images each day. I use rsync for all sorts of situations where data needs to be copied or moved about, and here then was another opportunity to use it. Two requirements:

  1. open-source, or at least freeware
  2. automated, please!

On the PC I installed DeltaCopy, a free open source package built around rsync 2.6.6. It’s easy to install, easy to setup and then you forget about it. Since we wanted to save all images in E:Scans I set up the configuration on the scanner machine very simply:

[Scans]
    /cygdrive/e/Scans

I also enabled a password with the username “archive”.  You can find out how to do all this in the documentation that comes with DeltaCopy, it’s very clear.

The scanner machine had a firewall enabled, so I opened port 873/TCP to allow an rsync client to connect.  Then on the Linux system which was going to perform the archiving, I set up a cron job to run nightly which ran the following command:

rsync −−verbose
      −−recursive
      −−modify-window=2
      −−password-file=/root/pass.txt
      archive@scannermachine::Scans /data/archive

This pulled any new files from the E:Scans folder each night. Of course having the plain-text password visible, even if only by root, isn’t ideal so using SSH keys instead would be preferable.

In archive :: stuff :: Part II we will look at building on this basic archive scheme, and provide details on upgrading rsync used by DeltaCopy to 2.6.9 for a handy extra feature.

Leave a Reply