PsySkeletor has asked for the wisdom of the Perl Monks concerning the following question:
# MYSQL BACKUP my @bk_mysql = qx(/usr/bin/mysql -u $uMy -p$pMy -e 'show databases'); foreach $1 (@bk_mysql){ chomp $1; $fMy = "mysql_-$1-$tLog"; $mysqlC ++; print "$mysqlC MySQL Database $1\n"; qx (mysqldump -u $uMy -p$pMy $1 | gzip -9 > $foMy/$fMy.gz ); print "Compressing file $fMy\n"; qx (/usr/bin/rsync -avzP -e "ssh -i /root/.ssh/rsyncstrato" $ +foMy/$fMy.gz account-xxxx\@rsync.hidrive.strato.com:/users/account-xx +xx/backups/mysql/$tLog/ ); print "Sending Backup to Cloud..\n"; qx (rm $foMy/$fMy.gz); print "Backup file uploaded and deleted $foMy/$fMy\n"; printf LOG "DB DONE -> $foMy/$fMy\n"; push @mysql_re, $fMy; push @mysql_status, @$; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Another way to catch rsync STDERR
by salva (Canon) on Dec 24, 2012 at 13:11 UTC | |
by PsySkeletor (Initiate) on Dec 24, 2012 at 15:26 UTC | |
|
Re: Another way to catch rsync STDERR
by Corion (Patriarch) on Dec 24, 2012 at 12:47 UTC |