--
You received this message because you are subscribed to the Google Groups "Percona Discussion" group.
To post to this group, send email to percona-d...@googlegroups.com.
To unsubscribe from this group, send email to percona-discuss...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/percona-discussion?hl=en.
Thanks David.
The script is a simplified version of the above statement
NOWDATE=`date +%Y-%m-%d-%h-%I`
# backup everything
sudo /usr/bin/innobackupex --user=user --password=pass /tmp/mysqlbackup/ --stream=tar | gzip > /tmp/mysqlbackup/mysql_$NOWDATE.tar.gz
# upload backed up files
/usr/bin/s3cmd put --acl-private /tmp/mysqlbackup/mysql_$NOWDATE.tar.gz s3://backup.site.com/mysql_$NOWDATE.tar.gz
# remove archive
rm /tmp/mysqlbackup/mysql_$NOWDATE.tar.gz
I may be off base here but if this is your cronjob you shouldn't need to use sudo and doing so would likely cause it to fail would it not.
As far as getting rid of the stdout and only paying attention to stderr, why don't you just log all output and test for success... Ex.
Innobackupex > logfile 2>&1
[ $? -gt 0 ] && echo "problem"
I haven't tested this with innobackupex but if it finds failure I'm pretty sure it will exit 1 like most other applications
Thanks John. The sudo is certainly a concern. Will remove.
I wanted to resist greping the output since XtraDBbackup is spitting out normal values to STDERR and this would be a hack around it. I wanted to understand if there is a reason behind it.
I wanted to resist greping the output since XtraDBbackup is spitting out normal values to STDERR and this would be a hack around it. I wanted to understand if there is a reason behind it.