I'm stuck!!!
Look this command line log:
-bash-2.05b# pwd
/usr/backups
-bash-2.05b# ls
.backup.gaia.sh.swp backup.gaia.sh
------------------------------------------------------
#NEXT COMMAND IS ENTERED BY HAND IN THE SHELL
-------------------------------------------------------
-bash-2.05b# rsync -a -v --delete --timeout 120 --exclude='/msurdi/*'
localhost:/home/ /usr/backup s/gaia.0/
Password:
receiving file list ... done
created directory /usr/backups/gaia.0
./
msurdi/
test/
test/aaa.txt
sent 75 bytes received 195 bytes 77.14 bytes/sec
total size is 0 speedup is 0.00
-bash-2.05b# ls gaia.0/msurdi/
-------------------------------------------------------------------
#THAT'S RIGHT, NOTHING ON /HOME/MSURDI WAS TRANSFERRED :-)
---------------------------------------------------------------------
-------------------------------------------------------------------
#NOW, LET'S TRY FROM MY SCRIPT
---------------------------------------------------------------------
-bash-2.05b# sh backup.gaia.sh
Try 1 of 3...
--------------------------------------------------------------------
#NEXT COMMAND, IS JUST AN "ECHO" OF THE COMMAND THAT WILL
BE
RUN IN NEXT STEP.
---------------------------------------------------------------------
rsync -a -v --delete --timeout 120 --exclude='/msurdi/*'
localhost:/home/ /usr/backups/gaia.0/
Rotating backups...
-bash-2.05b# rm -r gaia.0
-------------------------------------------------------------------
#NOW, I REMOVED THE "ECHO" FROM THE SCRIPT SO THAT IT GETS RUN
---------------------------------------------------------------------
-bash-2.05b# sh backup.gaia.sh
Try 1 of 3...
Password:
receiving file list ... done
created directory /usr/backups/gaia.0
./
msurdi/
msurdi/.cshrc
msurdi/.login
msurdi/.login_conf
msurdi/.mail_aliases
msurdi/.mailrc
msurdi/.profile
msurdi/.rhosts
msurdi/.shrc
test/
test/aaa.txt
sent 253 bytes received 4649 bytes 1400.57 bytes/sec
total size is 3925 speedup is 0.80
Rotating backups...
-bash-2.05b#
-------------------------------------------------------------------
#DAMN!DAMN!DAMN! - IF THE COMMAND IS EXACTLY THE SAME, ON THE SAME HOST
?WHY RSYNC BEHAVES DIFFERENTLY IF IT'S RUN FROM THE COMMAND LINE OR FROM
A SHELL SCRIPT?
I'M THINKING THAT MAYBE COULD BE SOMETHING RELATED TO ANY ENVIROMENT
VARIABLE.
IF YOU WISH, I COULD POST THE ENTIRE SHELL SCRIPT SOURCE
------------------------------------------------------------------
Thanks everybody in advance.
Matias.