Cygwin rdiff-backup

Jason Piterak Jason_Piterak@c-i-s.com
Mon, 4 Feb 2002 16:54:24 -0500


Hello all,
  On a lark, I thought I would attempt to get rdiff-backup to work under
Windows98 under Cygwin. We have a number of NT/Win2K servers in the field
that I'd love to be backing up via rdiff-backup, and this was the start of
getting that working. 

SUMMARY: 
  o You can get all the pieces for rdiff-backup working under Cygwin.
  o The backup process works up to the point of writing any files with
timestamps.
      ... This is because the ':' character is reserved for Alternate Data
Stream (ADS) file designations under NTFS.

HOW TO GET IT WORKING (to a point, anyway):
  o Install Cygwin
  o Download the Python 2.2 update through the Cygwin installer and install.
  o Download the librsync libraries from the usual place, but before
compiling...
  o Cygwin does not use/provide glibc. Because of this, you have to repoint
some header files in the Makefile:

   -- Make sure that you have /usr/include/inttypes.h
      redirected to /usr/include/sys/types.h. Do this by:

      create a file /usr/include/inttypes.h with the contents:
      #include <sys/types.h>
  o Put rdiff-backup in your PATH, as you normally would.


WHERE IT FAILS (Writing timestamps):

Here's the traceback you get when rdiff-backup tries to write the .snapshot
file:
  
Writing file object to jp_misc-bu/test
Touching mirror marker
jp_misc-bu/rdiff-backup-data/current_mirror.2002-02-04T15
:56:50-05:00.snapshot
Touching
jp_misc-bu/rdiff-backup-data/current_mirror.2002-02-04T15:56:50-05:00.s
napshot
Traceback (most recent call last):
  File "/usr/local/bin/rdiff-backup", line 3907, in ?
    Globals.Main.Main()
  File "/usr/local/bin/rdiff-backup", line 3675, in Main
    self.take_action(rps)
  File "/usr/local/bin/rdiff-backup", line 3651, in take_action
    elif self.action == "backup": self.Backup(rps[0], rps[1])
  File "/usr/local/bin/rdiff-backup", line 3704, in Backup
    self.backup_touch_curmirror(rpin, rpout)
  File "/usr/local/bin/rdiff-backup", line 3771, in backup_touch_curmirror
    mirrorrp.touch()
  File "/usr/local/bin/rdiff-backup", line 2101, in touch
    self.conn.open(self.path, "w").close()
IOError: [Errno 2] No such file or directory:
'jp_misc-bu/rdiff-backup-data/curr
ent_mirror.2002-02-04T15:56:50-05:00.snapshot'

  ... Of course, a touch from commandline yeilds similar results:

Jason piterak@SASHERMOBILE ~/tmp/jp_misc-bu/rdiff-backup-data
$ touch current_mirror.2002-02-04T16-07-30-05:00.snapshot
touch: creating `current_mirror.2002-02-04T16-07-30-05:00.snapshot': No such
fil
e or directory

Jason piterak@SASHERMOBILE ~/tmp/jp_misc-bu/rdiff-backup-data
$ touch current_mirror.2002-02-04T16-07-30-05-00.snapshot

  ... Which makes sense, considering that the ':' character is reserved for
Alternate Data Stream (ADS) file designations under NTFS. (A whole other
interesting topic... check out the vuln-dev@security-focus.com archives on
hidden executables).

So...

  Ben, is there any way we can get you to add a commandline switch (or do an
environment lookup), that changes rdiff-backup to use a windoze-compatible
character for the timestamp ':' character?

Take care all,


--Jason


---
Jason Piterak
CIS Technical Services
33 Main St., Suite 302
Nashua, NH 03064
(603) 889-4684 - FAX (603) 889-0534