Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
I have this file on my editcron.sh
#!/bin/sh CRONTXT=/mnt/HD_a2/crontab.txt # start with existing crontab /bin/crontab -l > $CRONTXT # add the Rsync job to execute at 2:05 am - also create a logfile /bin/echo "* */2 * * * /bin/sh /mnt/HD_a2/ffp/rsync-flux.sh" >> $CRONTXT # install the new crontab /bin/crontab $CRONTXT # clean up /bin/rm $CRONTXT
I have this file on /mnt/HD_a2/ffp/rsync-flux.sh
#!/bin/sh cp -r /mnt/HD_a2/ffp/.ssh/ /home/root/ /mnt/HD_a2/ffp/bin/rsync -av root@xyz.com:/home/flux/completed /mnt/HD_a2/ >> /mnt/HD_a2/ffp/logs/rsync-flux.log /bin/echo "#############################" >> /mnt/HD_a2/ffp/logs/rsync-flux.log
i check my rsync-flux.log and only "##############" is writing on the logs fine an not the line no 1 & 2?
pls help
Offline
Maybe rsync fails, without writing anything on stdout (all messages printed to stderr).
So maybe try:
/mnt/HD_a2/ffp/bin/rsync -av root@xyz.com:/home/flux/completed /mnt/HD_a2/ >> /mnt/HD_a2/ffp/logs/rsync-flux.log 2>&1
Last edited by ismora (2008-08-30 23:21:41)
Offline
Thanks for the help. I now see the error message and I'm still stuck at my own command.
file on /mnt/HD_a2/ffp/rsync-flux.sh
#!/bin/sh /mnt/HD_a2/ffp/bin/rsync -aPve ssh root@xyz.com:/home/flux/completed/sync /mnt/HD_a2/ >> /mnt/HD_a2/ffp/logs/rsync_flux.log 2>&1 /bin/echo "#############################" >> /mnt/HD_a2/ffp/logs/rsync_flux.log
I have this error in my logs file
rsync: Failed to exec ssh: No such file or directory (2) rsync error: error in IPC code (code 14) at pipe.c(84) [receiver=3.0.3] rsync: writefd_unbuffered failed to write 4 bytes [receiver]: Broken pipe (32) rsync error: error in IPC code (code 14) at io.c(1544) [receiver=3.0.3] #############################
when i run this command in telnet session, I can rsync my files.
/mnt/HD_a2/ffp/bin/rsync -aPve ssh root@xyz.com:/home/flux/completed/sync /mnt/HD_a2/ >> /mnt/HD_a2/ffp/logs/rsync_flux.log 2>&1
Offline
I can answer my own question
i was missing rsync and ssh executable. here is the success file
#!/bin/sh export SSH=/mnt/HD_a2/ffp/bin/ssh export RSYNC=/mnt/HD_a2/ffp/bin/rsync date=`date "+%Y%m%d-%H%M%S"` /bin/echo $date >> /mnt/HD_a2/ffp/logs/rsync_flux.log $RSYNC -aPve $SSH root@xyz.com:/home/flux/completed/sync /mnt/HD_a2/ >> /mnt/HD_a2/ffp/logs/rsync_flux.log 2>&1
Offline