Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Another way to catch rsync STDERR

by salva (Canon)
on Dec 24, 2012 at 13:11 UTC ( [id://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.

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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-04-19 14:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found