[Pgcluster-general] usefule rsync-wrapper

Zoff zoff at zoff.cc
Sun May 13 18:19:22 UTC 2007


Hi!

i found this useful when testing all components on the same machine with different user names:

!!! user at own risk !!!

but it works fine on my system (for 1.1 and for 1.3 versions)



what you have to do:

*) replace "node1" and "node1.com" with your hostname and full-hostname in the rsync_dummy script
*) also change in ALL your cluster.conf:

       <Rsync_Path> /usr/bin/rsync </Rsync_Path>
       <Rsync_Option> ssh -1 </Rsync_Option>

replace with:

       <Rsync_Path> /usr/bin/rsync_dummy </Rsync_Path>
       <Rsync_Option> ssh </Rsync_Option>




save this script as "/usr/bin/rsync_dummy"

----------------------------SNIP----------------------------
#! /bin/bash
####################################
#
# rsync-wrapper for pgcluster !!!
#
# without this its almost impossible to get this stuff to work
#
#      by Zoff <zoff at zoff.cc> in May 2007
#
####################################

echo "--"`date` >> /tmp/rsync.log
echo U:`id` >> /tmp/rsync.log
echo D:`pwd` >> /tmp/rsync.log

args="$*"
echo $args >> /tmp/rsync.log

args=`echo $args | sed -e "s/node1.com://"`
args=`echo $args | sed -e "s/node1://"`
args=`echo $args | sed -e "s/localhost://"`

args="--rsync-path=/usr/bin/rsync "`echo $args | sed -e "s/-e ssh /-e ssh root at node1:/"`
echo $args >> /tmp/rsync.log

echo /usr/bin/rsync_real $args >> /tmp/rsync.log

/usr/bin/rsync_real $args
----------------------------SNIP----------------------------


cheers,
Zoff.


More information about the Pgcluster-general mailing list