<?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>Optima Solutions &#187; Servers</title>
	<atom:link href="http://www.optimasolutions.co.uk/category/blog/servers/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.optimasolutions.co.uk</link>
	<description>Internet Consultancy without the technobabble</description>
	<lastBuildDate>Thu, 11 Mar 2010 21:15:17 +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>Monitoring your servers to ensure uptime &#8211; Server Density</title>
		<link>http://www.optimasolutions.co.uk/2010/03/11/monitoring-your-servers-to-ensure-uptime-server-density/</link>
		<comments>http://www.optimasolutions.co.uk/2010/03/11/monitoring-your-servers-to-ensure-uptime-server-density/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 21:15:17 +0000</pubDate>
		<dc:creator>Stuart</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[servers serverdensity monitoring hosting]]></category>

		<guid isPermaLink="false">http://www.optimasolutions.co.uk/?p=219</guid>
		<description><![CDATA[Anybody who host web sites and applications for clients knows how important it is to make sure that you have the ability to monitor the health and availability of your servers &#8211; even when you&#8217;re not at your desk.
In reality, there are many tools to do this, and quite a few are free. I&#8217;ve set [...]]]></description>
			<content:encoded><![CDATA[<p>Anybody who host web sites and applications for clients knows how important it is to make sure that you have the ability to monitor the health and availability of your servers &#8211; even when you&#8217;re not at your desk.</p>
<p>In reality, there are many tools to do this, and quite a few are free. I&#8217;ve set up <a href="http://www.nagios.org/" target="_blank">Nagios</a> in the past as it&#8217;s extremely comprehensive, but it&#8217;s also a bit of a nightmare to get your head around and takes a lot of time to get working in the way you want.</p>
<p>For the past six months or so, I&#8217;ve been using a fairly new server monitoring tool, <a href="http://www.serverdensity.com/landing/?a=site&#038;s=optimasolutions" target="_blank">Server Density</a>, to handle my monitoring for me. And it excels at the task.</p>
<p>Install takes less than five minutes via a well documentated python script, and once that&#8217;s done and your basic config is in place, off it goes. Within minutes you can view the status of your server via the many on-screen charts and grids they have. You can choose to monitor CPU load, memory, processes, disk usage, network traffic, Apache and MySQL, and set custom alert thresholds against each. Then you choose to receive the alerts via email, text or even iPhone push. I use both the email and iPhone options to ensure I&#8217;m kept up-to-date. They even have a free iPhone application for you to view your server status on the go.</p>
<p>Over time, the tool will start to learn about your server to get a feel for it&#8217;s normal load levels. Once it&#8217;s done this it shows you clearly anything that falls outside of those levels via &#8216;anomaly&#8217; tracking.</p>
<p><a href="http://www.boxedice.com/" target="_blank">Boxed Ice</a>, the company behind Server Density, are a relatively new outfit, set up by David Mytton who&#8217;s currently still at university(!). They were one of the winners of <a href="http://www.seedcamp.com" target="_blank">Seedcamp</a> 2009, an investment program that sees 5 start-ups receiving investment.<a href="http://blog.boxedice.com/2010/01/25/boxed-ices-application-to-mini-seedcamp-london-2009/" target="_blank">David posted a great article</a> on the Boxed Ice blog about his experiences with this, which is well worth a read.</p>
<p>Since I&#8217;ve had <a href="http://www.serverdensity.com/landing/?a=site&#038;s=optimasolutions" target="_blank">Server Density</a> installed, I no longer wonder whether I&#8217;m going to know how my servers are performing. And for the measly price of £7 per month it really is a no-brainer. A great tool and supporting start-ups? It gets my vote!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.optimasolutions.co.uk/2010/03/11/monitoring-your-servers-to-ensure-uptime-server-density/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatic mySQL backups via email (Postfix -&gt; Google Mail)</title>
		<link>http://www.optimasolutions.co.uk/2009/10/30/automatic-mysql-backups-via-email-googlemail-postfix-ubuntu/</link>
		<comments>http://www.optimasolutions.co.uk/2009/10/30/automatic-mysql-backups-via-email-googlemail-postfix-ubuntu/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 10:07:07 +0000</pubDate>
		<dc:creator>Stuart</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[googlemail]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.optimasolutions.co.uk/?p=193</guid>
		<description><![CDATA[When I was setting up my latest virtual server (courtesy of the ever fantastic VPS.net cloud), I wanted to come up with a simple hourly backup policy for the mySQL databases that reside on the machine. Every hour, I wanted to dump the databases, tar/zip them up in a single archive and email it with [...]]]></description>
			<content:encoded><![CDATA[<p>When I was setting up my latest virtual server (courtesy of the ever fantastic <a href="http://manage.aff.biz/z/155/CD2751/&amp;dp=1247" target="_blank">VPS.net</a> cloud), I wanted to come up with a simple hourly backup policy for the mySQL databases that reside on the machine. Every hour, I wanted to dump the databases, tar/zip them up in a single archive and email it with an appropriate date/time stamp to a backup store email account.</p>
<p>I&#8217;m a long time user of Google Apps for email, and an even longer time user of regular Gmail. As Google Apps (or a regular Gmail account) has a lot of storage space, it seems perfect for the job. I thought I&#8217;d see how easy it was to use one of these as an SMTP relay for any mail the server needed to send &#8211; and in this case &#8211; to send and store my backups.</p>
<p>With a lot of hunting around, I eventually pieced together a solution that worked from a few  different sources. So in the interests of helping anyone who needs something similar, here&#8217;s how I did it. I&#8217;m on Ubuntu 8.04.3 LTS. I&#8217;m guessing later versions will be very similar (if not identical).</p>
<p><strong>1. Set up Google Apps/Gmail accounts</strong></p>
<p>I set up two &#8211; a &#8216;no-reply&#8217; account I would use to send <strong>all</strong> email from the server, and a &#8216;backups&#8217; account for receiving the backup emails.</p>
<p><strong>2. Install and configure Postfix</strong></p>
<p>There are many, many tutorials out there, and believe me a tried a few. <a href="http://behindmyscreen.newsvine.com/_news/2006/12/31/501615-configuringubuntu-postfix-and-gmail-in-101-easy-steps" target="_blank">Here&#8217;s one</a> that actually worked. Well, mostly. The bit about <span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px; white-space: pre;">tls_per_site:</span></p>
<pre>smtp.gmail.com MUST
comp1.bob.com MUST
comp2.bob.com MUST
p&gt;</pre>
<p>..skip the <span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px; white-space: pre;">p&gt;<span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;">bit &#8211; it&#8217;s malformed html.</span></span></p>
<p>Do also make sure that you follow the information about setting up the Equifax certificate rather than the Thawte one &#8211; Google changed this in September and the system will not work if you use the wrong certificate.</p>
<p>Secondly, after following these instructions through any attempt to send mail was met with the following entry in <span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px; white-space: pre;">/var/log/mail.log<span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;">:</span></span></p>
<pre>postfix/smtp[7275]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused</pre>
<p>After a lot of looking around, I finally tracked it down to the following line in the main Postfix config file, located in <span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px; white-space: pre;">/etc/postfix/main.cf<span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;">:</span></span></p>
<pre>content_filter = amavis:[127.0.0.1]:10024</pre>
<p>Seems that this is a spam content filter which wasn&#8217;t installed correctly. In my case, since all I&#8217;m sending is backups, I didn&#8217;t need it. Commenting out this line and reloading Postfix (<span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px; white-space: pre;">sudo postfix reload<span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;">) sorted this out for me &#8211; mails were now sent.</span></span></p>
<p><strong>3. Set up the database backup system</strong></p>
<p>Again, there are many examples of this out there. I used <a href="http://www.sematopia.com/2006/02/how-to-backup-mysql-database-email-results-using-php/" target="_blank">this one</a> (requires PEAR for PHP), and adjusted it quickly to work on multiple databases. Make sure your backup location is writable by the server.</p>
<p><strong>4. Schedule the backup via CRON</strong></p>
<p>Dead simple &#8211; create a new CRON task for your user account:</p>
<pre>crontab -e</pre>
<p>and enter the following line (replacing the path to your backup script as appropriate):</p>
<pre>@hourly /usr/bin/php -q /home/[yourhome]/bin/backup.php &amp;&gt; /dev/null</pre>
<p>My script runs hourly. Adjust as you need.</p>
<p>And that&#8217;s it. Hourly backups taken to a secure &#8216;offsite&#8217; location with bags of storage space. Just what I was looking for.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.optimasolutions.co.uk/2009/10/30/automatic-mysql-backups-via-email-googlemail-postfix-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
