CygwinToLinux

From RdiffBackupWiki

Jump to: navigation, search

I am able to backup files from a laptop with win2k / cygwin to my linux server.

I am using rdiff-backup version 13.4

On the cygwin side, I encounterred a problem with daylight savings time. I got around it by forcing the timezone to UTC in my backup script.

TZ=3D

export TZ

... rdiff-backup

On the restore side, I encounterred a problem with permissions. The userids from cygwin obviously don't match my linux server. I do not like to run as root so I had to make the following change on the linux side:

diff -wu restore.py.orig restore.py
--- restore.py.orig     2004-02-08 22:27:33.000000000 -0500
+++ restore.py  2004-02-08 22:45:56.000000000 -0500
@@ -331,7 +331,7 @@
                """Initialize [[CachedRF]], self.rf_list variable"""
                self.root''rf =3D root''rf
                self.rf_list =3D [[]] # list should filled in index order
-               if Globals.process_uid =====3D 0:
===
+               if Globals.process_uid <code>3D</code>3D 9:
                        self.perm_changer <code>3D </code>
[[PermissionChanger]](root''rf.mirror''rp)

        def list''rfs''in_cache(self, index):
@@ -348,7 +348,7 @@
                                if not self.add_rfs(index): return None
                        rf =3D self.rf_list[[0]]
                        if rf.index <code>3D</code>3D index:
-                               if Globals.process_uid ====<code>3D 0: </code>
===
self.perm''changer(rf.mirror''rp)
+                               if Globals.process_uid <code>3D</code>3D 9: 
self.perm''changer(rf.mirror''rp)
                                return rf
                        elif rf.index > index:
                                # Try to add earlier indicies.  But if 
first is
@@ -379,7 +379,7 @@
                parent_index =3D index[[:-1]]
                temp_rf <code>3D </code>
[[RestoreFile]](self.root''rf.mirror''rp.new''index(parent''index),
                                                          
self.root''rf.inc''rp.new''index(parent''index), [[]])
-               if Globals.process_uid ====<code>3D 0: </code>
===
self.perm''changer(temp''rf.mirror_rp)
+               if Globals.process_uid <code>3D</code>3D 9: 
self.perm''changer(temp''rf.mirror_rp)
                new''rfs =3D list(temp''rf.yield''sub''rfs())
                if not new_rfs:
                        log.Log("Warning: No RFs added for index %s" % 
(index,), 2)
@@ -389,7 +389,7 @@

        def close(self):
                """Finish remaining rps in [[PermissionChanger]]"""
-               if Globals.process''uid =====3D 0: self.perm''changer.finish()
===
+               if Globals.process''uid <code>3D</code>3D 9: self.perm''changer.finish()


 class [[RestoreFile]]:
</verbatim>

[[TroelsArvin]] asks: Gregor, is uid 9 some magic UID (Administrator?) on 
Windows? What does the patch do?
Personal tools