Andrej Koelewijn

10/13/2003

Rsync

Filed under: — andrejk @ 5:01 pm


We use pvcs here for version control. Problem is that pvcs is only available on a unix server, and i do most of my development using toad on my windows laptop. It’s easy to synchronize two directories, one on my laptop, and one in my home directory on unix with rsync. Rsync is part of cygwin


rsync -auv --rsh="ssh -l <username>" --exclude "*.swp"
--exclude "*.log" --exclude "*~"
<unix_server>:<home_directory>/<project_folder> .


rsync -auv --rsh="ssh -l <username>" --exclude "*.swp"
--exclude "*.log" --exclude "*~"
. <unix_server>:<home_directory>/<project_folder>


This works ok, except for one small problem. When a file doesn’t change, size doesn’t change, and the timestamp doesn’t change, but the file mode access permission do change, these are not synchronized. This happends when i a file out of pvcs to lock it, the file permission change so that it is writable. After using rsync, the file will still be unwritable on my laptop.

3 Responses to “Rsync”

  1. Babu Says:

    unison is a bidirectional syncher, using rsync’s algorithm – you can get a native Win32 compiled version too. I use it regularly between Win32 and *nix machines and it works very well – don’t know about the permission modes though.

    http://www.cis.upenn.edu/~bcpierce/unison/

  2. andrej Says:

    Thanks, i’ll check it out.

  3. andrej Says:

    I looked at unison, but i need to run the server part on hpux and there’s no hpux binary available. Unison is written in OCaml, for which i couldn’t find a binary compiler for hpux, so i guess i’ll stick with rsync for the time being.

Leave a Reply

Powered by WordPress