Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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 {...... ..... .....

Replies are listed 'Best First'.
Re: Net::OpenSSH rsync_get/rsync_put
by salva (Abbot) 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1064551]
Approved by Corion
[hippo]: That's some Joycean spam.

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2018-05-22 12:24 GMT
Find Nodes?
    Voting Booth?