rsync hangs after counting some file list
Ravi Thati
gotothati at gmail.com
Mon Sep 29 05:07:53 GMT 2008
Hi All,
I have written script to download a directory from remote machine which
contains the always the updated data. I want to download that directory
onto my local machine periodically with --link-dest option to my old
download directory.
I have automated the script using " expect scripting"
Following script I have written:
$> cat ravi.ex
#!/usr/bin/expect --
set LDEST [lindex $argv 0] ## for link-dest option
set SRC [lindex $argv 1]## for source on remote m/c
set DEST [lindex $argv 2]## for dest on local m/c
eval exp_spawn rsync -avz --stats --progress --partial $LDEST $SRC $DEST
expect "password"
send "gbuilder\r"
expect %
set retVal [exp_wait]
set pid [lindex $retVal 0]
set spawn_id [lindex $retVal 1]
set os_error [lindex $retVal 2]
set exit_status [lindex $retVal 3]
exit $exit_status ## returning the exit status of the rsync command.
When I run the script I get the following output and it hangs indefinitely.
~/ravit/ravi.ex "--link-dest=/Build56/source/"
"user at remotemachine:/Build58/source/"
"./source/"
exp_spawn rsync -avz --stats --progress --partial
--link-dest=/Build56/source/ user at remotemachine:/Build58/source/ ./source/
user at remotemachine's password:
receiving file list ...
20900 files...
(There are lot more files to be counted )Actually I have millions of files
inside the directory.
What might be the problem ? Any guess??
It hangs at different counts at different run. some times 19300 OR 20100
etc.
Thanks for any help.
--
Regards,
Ravi.Thati
-------------- next part --------------
HTML attachment scrubbed and removed
More information about the rsync
mailing list