Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2003
    Posts
    4

    Unanswered: dynamic rsync.... (cron?)

    Hi,

    I am using Debian woody 3.0_r1 on hppa

    I have two web servers on apache. One Primary and one secondary. And I have created a cron job that use rsync to update the content of the /var/www/ directory on the secondary web server (so far every night).
    Like that I have my two web servers with the same content....

    But I dont think its the best... what I d like to do is to run my rsync script each time the /var/www directory of the primary sever is modified...

    Anyone got any ideas...
    Maybe using the sockets?

    Thanks
    Francois
    ..

  2. #2
    Join Date
    Jun 2002
    Location
    UK
    Posts
    525
    while true; do
    newDetails=$(ls -ld theDirectory)
    if [ "${newDetails}" != "${oldDetails:-$newDetails}" ]
    then
    doYourSyncStuff
    fi
    oldDetails=${newDetails}
    sleep 5
    done

  3. #3
    Join Date
    Sep 2003
    Posts
    4
    Hi,

    Thanks for the script....But that means that I have to install ssh or rsh on my two web servers...Cuz I have to copy FROM the server TO the client...

    In fact I woyld like the reverse side...
    The client to check whether there is any update to do... like that I have nothing to had on my machines and if i add so other web server in my LVS (load balancing the http) i just have to replicate the same script...

    its not the easier way....
    You might think that I have a twisted mind

    But if you have any hints..

    Thanks
    francois

  4. #4
    Join Date
    Dec 2003
    Posts
    4

    Implementing this "cron" ??

    Originally posted by Damian Ibbotson
    while true; do
    newDetails=$(ls -ld theDirectory)
    if [ "${newDetails}" != "${oldDetails:-$newDetails}" ]
    then
    doYourSyncStuff
    fi
    oldDetails=${newDetails}
    sleep 5
    done
    hello, I have a couple questions regarding this please?... Newbie < fairly to NIX >... and just needing to mirror sites on remote servers..

    thank-you, and HELP ANYONE???

    jim

  5. #5
    Join Date
    Dec 2003
    Posts
    4

    Implementing this "cron" ??

    Originally posted by Damian Ibbotson
    while true; do
    newDetails=$(ls -ld theDirectory)
    if [ "${newDetails}" != "${oldDetails:-$newDetails}" ]
    then
    doYourSyncStuff
    fi
    oldDetails=${newDetails}
    sleep 5
    done
    hello, I have a couple questions regarding this please?... Newbie < fairly to NIX >... and just needing to mirror sites on remote servers..

    thank-you, and HELP ANYONE???

    jim

  6. #6
    Join Date
    Oct 2003
    Location
    Slovakia
    Posts
    482

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •