<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Brian Bell &#187; Sysadmin</title>
	<atom:link href="http://webguru.org/category/sysadmin/feed/" rel="self" type="application/rss+xml" />
	<link>http://webguru.org</link>
	<description>Bits of web-dev, travel and personal musings...</description>
	<lastBuildDate>Mon, 09 Nov 2009 21:36:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Replacement Batteries for APC SU1000XLNET and BU550R</title>
		<link>http://webguru.org/2008/07/21/general/replacement-batteries-for-apc-su1000xlnet-and-bu550r/</link>
		<comments>http://webguru.org/2008/07/21/general/replacement-batteries-for-apc-su1000xlnet-and-bu550r/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 18:47:35 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[apc]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[batteries]]></category>
		<category><![CDATA[bu550r]]></category>
		<category><![CDATA[gruber power]]></category>
		<category><![CDATA[rbc11]]></category>
		<category><![CDATA[rbc2]]></category>
		<category><![CDATA[rbc7]]></category>
		<category><![CDATA[replacement]]></category>
		<category><![CDATA[su1000xlnet]]></category>
		<category><![CDATA[ups]]></category>

		<guid isPermaLink="false">http://webguru.org/2008/07/21/general/replacement-batteries-for-apc-su1000xlnet-and-bu550r/</guid>
		<description><![CDATA[I needed to replace the batteries in my APC SmartUPS 1000XL battery backup, its external battery pack (SU24XLBP) and a smaller system, the BackupUPS ES 550.  After looking at the options on &#8220;official&#8221; replacements from APC and consequently realizing that money is not currently growing on the primarily ornamental trees in my yard; I decided [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to replace the batteries in my APC SmartUPS 1000XL battery backup, its external battery pack (SU24XLBP) and a smaller system, the BackupUPS ES 550.  After looking at the options on &#8220;official&#8221; replacements from APC and consequently realizing that money is not currently growing on the primarily ornamental trees in my yard; I decided to peruse other options.</p>
<p>There are many places on the &#8216;net that you can find &#8220;comparable&#8221; batteries for your APC (and other) backup units.  Knowing that my friend <a href="http://cerient.net" title="Cerient Technologies">Jason</a> replaces battery backups with some frequency, I asked for his opinion.  He led me to <a href="http://www.gruberpower.com" title="Gruber Power Services">Gruber Power Services</a>.  What a find!</p>
<p align="center"><a href="http://www.gruberpower.com/index.htm" title="Gruber Power Services"><img src="http://content.screencast.com/media/59fafd99-418c-4535-83eb-c2ff5c827c14_e05c80de-13f2-4cd2-9256-5288ae1d27ce_static_0_0_2008-07-21_1436.png" border="0" width="595" height="148" /></a></p>
<p>The prices are extremely reasonable (e.g. $15.99 for a &#8220;RBC2&#8243; comparable battery which is $40 through APC and other sites). You obviously have to pay for shipping these heavy lead-acid batteries, but that is the case with any site from which you order.  Shipping for the entire order ended up being about $100 bucks (ugh!).</p>
<p>All told, I estimate that I saved about $350 (incl. shipping) by ordering from Gruber.  Assuming the rest of my experience matches those of my friend, I highly recommend them.</p>
<p><strong>UPDATE (7/23/08):</strong> Got a personal email this morning from &#8220;Dawn&#8221; thanking me for my order and providing to me the UPS tracking numbers for my shipment.  Pretty cool.</p>
<p><strong>UPDATE (7/30/08):</strong> The batteries were delivered Monday, as projected.  I have installed one of them so far and it fit well, connected easily and seems to be a great product.</p>
]]></content:encoded>
			<wfw:commentRss>http://webguru.org/2008/07/21/general/replacement-batteries-for-apc-su1000xlnet-and-bu550r/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Automated Backup and Testing Bash Script</title>
		<link>http://webguru.org/2007/10/31/lamp/mysql-automated-backup-and-testing-bash-script/</link>
		<comments>http://webguru.org/2007/10/31/lamp/mysql-automated-backup-and-testing-bash-script/#comments</comments>
		<pubDate>Wed, 31 Oct 2007 20:19:44 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://webguru.org/2007/10/31/lamp/mysql-automated-backup-and-testing-bash-script/</guid>
		<description><![CDATA[So &#8211; you can go to any one of 100,000 sites that will tell you how to do an automated MySQL database dump with some combination of mysqldump and crond, etc.  But, I was recently faced with the question, &#8220;what happens if the dump file is corrupt? can we validate it before we pack [...]]]></description>
			<content:encoded><![CDATA[<p>So &#8211; you can go to any one of 100,000 sites that will tell you how to do an automated MySQL database dump with some combination of mysqldump and crond, etc.  But, I was recently faced with the question, &#8220;what happens if the dump file is corrupt? can we validate it before we pack it away with our backup service?&#8221;  So I came up with this little shell script.</p>
<p>It does the following:</p>
<ol>
<li>Creates a backup of the selected db using mysqldump</li>
<li>Generates an MD5 checksum of the backup file (written to a separate file)</li>
<li>Attempts to restore the dumped file into a dummy test database</li>
<li>If errors are encountered, it grabs the error and sends an email to the designated address</li>
<li>If no errors are encountered, wraps the .sql and .sql.md5 in a timestamped, gzipped, tarball &#8211; then deletes the originals</li>
</ol>
<p><a href="http://www.webguru.org/content/mysql_backup.tar.gz">Download the file here</a></p>
<pre class="brush: css;">
#!/bin/sh
#######################################################
# LICENSE:
# (c) 2007 Brian Bell (GNU LGPL V2.1) You may
# view the full copyright text at:
# http://www.opensource.org/licenses/lgpl-license.html
#
# DESCRIPTION:
# A simple BASH script to do automate MySQL database
# backup; includes testing and MD5 hash creation.
# Emails designated address on failure.
#######################################################

## CONFIGURATION VARS
MYSQL_NAME=
MYSQL_HOST=
MYSQL_USER=
MYSQL_PASS=
MYSQL_TESTDB=
BACKUP_PATH=/path/to/backup/dir # No trailing slash
MAIL_SUBJECT=”TESTING MySQL Backup Error”
MAIL_TO=”monitor@yourdomain.com”

#######################################################
## We need to create a unique timestamp for use on the filename
TIMESTAMP=`date +%Y_%m_%d`

## Generate the base part of the filename to use in backing up
BACKUP_FILE_BASE=”${MYSQL_NAME}_${TIMESTAMP}”

echo “Backing up $MYSQL_NAME…”
/usr/bin/mysqldump –opt -c -e -Q -h $MYSQL_HOST -u $MYSQL_USER –password=$MYSQL_PASS \
–add-drop-table $MYSQL_NAME &gt; $BACKUP_PATH/$BACKUP_FILE_BASE.sql

## MD5 the backup file
/usr/bin/md5sum -t $BACKUP_PATH/$BACKUP_FILE_BASE.sql &gt; $BACKUP_PATH/$BACKUP_FILE_BASE.sql.md5

## Try to import the backup sql into a test db
MYSQL_RESULT=`/usr/bin/mysql -h ${MYSQL_HOST} -u ${MYSQL_USER} –password=${MYSQL_PASS} ${MYSQL_TESTDB} &lt; \
${BACKUP_PATH}/${BACKUP_FILE_BASE}.sql &gt;

${BACKUP_PATH}/mysql_test.log`

if [[ “$MYSQL_RESULT” =~ “ERROR” ]]
then
echo “The following error was encountered at `date` ” &gt; ${BACKUP_PATH}/error_email.log
echo “” &gt;&gt; ${BACKUP_PATH}/error_email.log
echo “#####################################################################” &gt;&gt; ${BACKUP_PATH}/error_email.log
echo $MYSQL_RESULT &gt;&gt; ${BACKUP_PATH}/error_email.log

echo “SENDING ERROR EMAIL TO: ${MAIL_TO}”
/bin/mail -s “$MAIL_SUBJECT” “$MAIL_TO” &lt; ${BACKUP_PATH}/error_email.log
else
tar czpf $BACKUP_PATH/$TIMESTAMP_$BACKUP_FILE_BASE.sql.tar.gz $BACKUP_PATH/$BACKUP_FILE_BASE.sql* –remove-files
fi
</pre>
]]></content:encoded>
			<wfw:commentRss>http://webguru.org/2007/10/31/lamp/mysql-automated-backup-and-testing-bash-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
