kaspermarkus / grimrepo

Intelligent syncing between client and servers
1 stars 0 forks source link

Rsync fails when not using checksums #13

Open kaspermarkus opened 14 years ago

kaspermarkus commented 14 years ago

What created the bug: function do_test {

make two identical dirs

    rm -rf "${GR_LOCALROOT}" "$GR_SERVERROOT"
    mkdir -p ${GR_LOCALROOT}{A,B,C}
    touch ${GR_LOCALROOT}{A/a1,B/b1,B/b2,C/c1}
    cp -r ${GR_LOCALROOT} ${GR_SERVERROOT}
    workingdir=`pwd`;
    #initialize repository
    ./repo_init.sh
    echo "change1" > ${GR_LOCALROOT}A/a1
    echo "change2" > ${GR_SERVERROOT}A/a1
    #make directory locally
    ./repo_sync.sh

}

Explanation: The program correctly identifies there is a difference between the files, but when the command is issued to copy (sync) the data one way or the other, the program doesnt seem to realize that the two files */A/a1 differs

Solutions: Could be handling by using scp instead of rsync, since we know which direction the sync should be in (in the cases i can think of) ... Could also be handed using the -c switch with rsync -- only worry about that is that it is too slow!