Good evening 

I use d as follows.
(It is every 5 minutes from Cron)

#!/bin/sh

LOCK=/tmp/lock.pid

if [ ! -e $LOCK ]; then
     echo 1 > $LOCK
     rsync -ave ssh --delete /export/mirror user@hostB:/export
     rsync -ave ssh --delete user@hostB:/export/ /export/mirror/
     rm > $LOCK
fi

However, now, it is.
It will be deleted even when a file is created on both sides.
Should the script or something that checks before rsync be put in?
As operation to desire
1 Mirroring of both directions can be performed.
2 File deleted by hostA (hostB)  It is deleted also by hostB(hostA).
3 File created by hostA   It can update also by hostB.

I want to use mirroring of both directions.
Is there any good method?

Reply via email to