Hi,
Can someone pls check this script and advice why it is not working ??
-------------------- #!/usr/bin/expect -f
spawn rsync -e "ssh -p 2222" -arvz --delete /var/www/html/ root@192.168.1.44:/var/www/html/ match_max 100000 expect "*?assword:*" send "12345678\r" send "\r" expect eof
spawn rsync -e "ssh -p 2222" -arvz --delete /Backups/ root@192.168.1.44:/Backups/ match_max 100000 expect "*?assword:*" send "12345678\r" send "\r" expect eof
spawn rsync -e "ssh -p 2222" -arvz --delete /etc/mail/ root@192.168.1.44:/etc/mail/ match_max 100000 expect "*?assword:*" send "12345678\r" send "\r" expect eof
--------------------------
I do see rsync prompts etc, but actual rsyn does not happen. No error messages too.
Thx for your time.
Best regards, Sandeep
On Fri, Apr 23, 2010 at 5:23 PM, RSCL Mumbai rscl.mumbai@gmail.com wrote:
Hi,
Can someone pls check this script and advice why it is not working ??
#!/usr/bin/expect -f
spawn rsync -e "ssh -p 2222" -arvz
I suspect this syntax. -e ssh --port=2222 should be there without any "" double inverted commas
#!/usr/bin/expect -f
spawn rsync -e "ssh -p 2222" -arvz
I suspect this syntax. -e ssh --port=2222 should be there without any "" double inverted commas
The below command works fine from command line: rsync -e "ssh -p 2222" -arvz --delete /var/www/html/ root@192.168.1.44:/var/www/html/
try this rsync --progress --stats --archive -z --compress --rsh='ssh -p 44444' -t <domain name>:<filepath> <destpath>
for pulling data
--- On Fri, 23/4/10, RSCL Mumbai rscl.mumbai@gmail.com wrote:
From: RSCL Mumbai rscl.mumbai@gmail.com Subject: Re: [ILUG-BOM] Need help with Rsync over SSh -- shell script To: "GNU/Linux Users Group, Mumbai, India" linuxers@mm.ilug-bom.org.in Date: Friday, 23 April, 2010, 6:01 PM
#!/usr/bin/expect -f
spawn rsync -e "ssh -p 2222" -arvz
I suspect this syntax. -e ssh --port=2222 should be there without any "" double inverted commas
The below command works fine from command line: rsync -e "ssh -p 2222" -arvz --delete /var/www/html/ root@192.168.1.44:/var/www/html/
On Fri, Apr 23, 2010 at 8:16 PM, Bhavesh Khare bhaveshkhare@yahoo.com wrote:
try this rsync --progress --stats --archive -z --compress --rsh='ssh -p 44444' -t <domain name>:<filepath> <destpath>
for pulling data
I may have misunderstood your suggestions... Individually, the rsync line I have constructed is working fine. I need help to debug the script and understand why it is not working when combined with "expect" command.
Any help is appreciated! Thx
On Fri, Apr 23, 2010 at 5:23 PM, RSCL Mumbai rscl.mumbai@gmail.com wrote:
Hi,
Can someone pls check this script and advice why it is not working ??
#!/usr/bin/expect -f
spawn rsync -e "ssh -p 2222" -arvz --delete /var/www/html/ root@192.168.1.44:/var/www/html/ match_max 100000 expect "*?assword:*" send "12345678\r" send "\r" expect eof
spawn rsync -e "ssh -p 2222" -arvz --delete /Backups/ root@192.168.1.44:/Backups/ match_max 100000 expect "*?assword:*" send "12345678\r" send "\r" expect eof
spawn rsync -e "ssh -p 2222" -arvz --delete /etc/mail/ root@192.168.1.44:/etc/mail/ match_max 100000 expect "*?assword:*" send "12345678\r" send "\r" expect eof
I do see rsync prompts etc, but actual rsyn does not happen. No error messages too.
Cud you paste output of your Expect script??
Thx for your time.
Best regards, Sandeep -- http://mm.glug-bom.org/mailman/listinfo/linuxers