Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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('', 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.

Replies are listed 'Best First'.
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1010186]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2017-05-23 21:40 GMT
Find Nodes?
    Voting Booth?