Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Net::OpenSSH rsync_get/rsync_put

by shivangi (Initiate)
on Nov 27, 2013 at 05:06 UTC ( #1064551=perlquestion: print w/ replies, xml ) Need Help??
shivangi has asked for the wisdom of the Perl Monks concerning the following question:

Hello, i am using Net::OpenSSH library. I am using rsync_get /rsync_put function to transfer the file to /from remote host. I have used progress attribute of rsync to display the progress of file transfer, But it don't work.

.......... ........ ...... if($_command eq "getfile") { for my $_entry (@_hosts) { $_pid{$_entry} = $_ssh{$_entry}->rsync_get({as +ync => 1, progress => 1, recursive => 1}, "/home/shagun/test.img", "/home/shivan +gi/") or warn "rsync_get to $_entry failed\n"; } } elsif($_command eq "putfile") { for my $_entry (@_hosts) { $_pid{$_entry} = $_ssh{$_entry}->rsync_put({as +ync => 1, progress => 1, recursive => 1}, "/home/test.img", "/home/shagun/") or warn "rsync_put t +o $_entry failed\n"; } } else {...... ..... .....

Comment on Net::OpenSSH rsync_get/rsync_put
Download Code
Re: Net::OpenSSH rsync_get/rsync_put
by salva (Monsignor) on Nov 27, 2013 at 08:31 UTC
    It works for me.

    What does "it don't work" means exactly?

      Hello Salva, The file gets successfully transferred by rsync_put but i am not able to see its progress. I had set the progress atrribute to 1, still the transfer progress of file isn't visible. Is there any way through which it can be shown ??? The transfer progress ????

        Post the code where you call Net::OpenSSH constructor.

        Also, enable the module debugging mode and post the output here:

        $Net::OpenSSH::debug = -1;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1064551]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2014-10-30 23:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (211 votes), past polls