Hi,
 
 When i try to run rsync command from command linne it is working fine.Below is the command
 
/usr/bin/rsync --compress \
               --verbose \
               --rsh=ssh \
               --times \
               --owner \
               --group \
               --ignore-times \
               --links \
               --perms \
               --recursive \
               --size-only \
               --delete \
               --force \
               --numeric-ids \
               --stats \
               /etc  \
               [EMAIL PROTECTED]:/home/backup/thismachine/
 
when i try to use shell script for this
 
#! /bin/bash
 
/usr/bin/rsync --compress \
               --verbose \
               --rsh=ssh \
               --times \
               --owner \
               --group \
               --ignore-times \
               --links \
               --perms \
               --recursive \
               --size-only \
               --delete \
               --force \
               --numeric-ids \
               --stats \
               /etc  \
               [EMAIL PROTECTED]:/home/backup/thismachine/
 
 
I am getting the following error
 
ssh: connect to host x.x.x.x port 22: No route to host
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(420)
 
this is related to ssh i believe.But when i try to use from the command prompt it is working without any problem through ssh
 
Please some one help me how to fix this error in shell script.Because i want to schedule this from cron
 
Thanks for your time
 
 

 
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to