Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Another way to catch rsync STDERR

by salva (Abbot)
on Dec 24, 2012 at 13:11 UTC ( #1010186=note: print w/ replies, xml ) Need Help??


in reply to Another way to catch rsync STDERR

use Net::OpenSSH!

my $ssh = Net::OpenSSH->new('rsync.hidrive.strato.com', user => 'account-xxxx', key_path => '/root/.ssh/rsyncstrato'); $ssh->error and die "unable to connect to remote host: " . $ssh->error +; $ssh->rsync_put({stderr_file => 'rsync.log'}, "$foMy/$fMy.gz", "/users/account-xxxx/backeups/mysql/$tLog/") or die "rsync failed: " $ssh->error;
BTW, it is not a good idea to use rsync for something that is generated on the fly and then compressed. That usually makes the rsync algorithm useless and inefficient. Just send the file uncompressed.

Another way to optimize rsync transfers is to place an old version of the file being transferrer (i.e. the backup from the previous day) at the destination.


Comment on Re: Another way to catch rsync STDERR
Download Code
Re^2: Another way to catch rsync STDERR
by PsySkeletor (Initiate) on Dec 24, 2012 at 15:26 UTC
    Thanks it seems pretty nice to do it using a perl module instead a qx call. The problem to send the backup uncompresses its, they are mysql backups, it means, uncompressed, around 10 databases of around 1 - 1.5 gb. Compressed, 40 / 50 mb per databases. It worth using it compressed even the rsync protocol doesnt work at full power. In fact, im using the rsync protocol because its the easier way to do the backup against hidrive.strato. The other options like SCP and SFTP doesnt work very well. Im going to try it now!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2014-12-21 06:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (104 votes), past polls