Find the answer to your Linux question:
Results 1 to 3 of 3
I am running scripts based on cron, but the log file shows the error below. if i ran the script manually, the error does not appear and it syncs normally ...
  1. #1
    Just Joined!
    Join Date
    Jul 2007
    Location
    CA
    Posts
    5

    rsync script error

    I am running scripts based on cron, but the log file shows the error below. if i ran the script manually, the error does not appear and it syncs normally all files to the remote pc. any suggestion please?

    rsync: connection unexpectedly closed (0 bytes received so far) [sender]
    rsync error: error in rsync protocol data stream (code 12) at io.c(359)

    rsync --stats -auvz -e "ssh -2" --delete --recursive --times -og /home/users/userXXXX userXXXXt@192.168.10.254:/home/users/

  2. #2
    Linux Enthusiast
    Join Date
    Jul 2005
    Location
    Maryland
    Posts
    521
    For some reason it's loosing connection during the cron job.
    Try to run it as scheduled command and see if it behaves the same:
    Code:
    echo "rsync --stats -auvz -e "ssh -2" --delete --recursive --times -og /home/users/userXXXX userXXXXt@192.168.10.254:/home/users/" > rsync_script.sh
    echo "sh rsync_script.sh" > start_rsync
    cat start_rsync | at 3:00
    P.S. It could be that it's waiting for password and then times out.

  3. #3
    Just Joined!
    Join Date
    Jul 2007
    Location
    CA
    Posts
    5
    Quote Originally Posted by pavlo_7 View Post
    For some reason it's loosing connection during the cron job.
    Try to run it as scheduled command and see if it behaves the same:
    Code:
    echo "rsync --stats -auvz -e "ssh -2" --delete --recursive --times -og /home/users/userXXXX userXXXXt@192.168.10.254:/home/users/" > rsync_script.sh
    echo "sh rsync_script.sh" > start_rsync
    cat start_rsync | at 3:00
    ill try it..


    P.S. It could be that it's waiting for password and then times out.
    - i setup a passwordless scp/ssh from local. running it on the console works fine. i dont know the reason it was working fine before..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...