<?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>Entrepremasochism &#187; powershell</title>
	<atom:link href="http://www.noahlh.com/blog/tag/powershell/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.noahlh.com/blog</link>
	<description>Figuring out the world, one day at a time.</description>
	<lastBuildDate>Thu, 03 Jul 2014 01:16:39 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4</generator>
		<item>
		<title>Automated Windows Server Backups on AWS EC2</title>
		<link>http://www.noahlh.com/blog/2014/07/automated-windows-server-backups-on-aws-ec2/</link>
		<comments>http://www.noahlh.com/blog/2014/07/automated-windows-server-backups-on-aws-ec2/#comments</comments>
		<pubDate>Thu, 03 Jul 2014 01:15:24 +0000</pubDate>
		<dc:creator>noahlh</dc:creator>
				<category><![CDATA[Geek Stuff]]></category>
		<category><![CDATA[automated]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[ebs snapshot]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[windows server 2012 r2]]></category>

		<guid isPermaLink="false">http://www.noahlh.com/blog/?p=23</guid>
		<description><![CDATA[I recently replaced an aging (and brittle&#8230;and risky) physical Windows box in our office with an AWS-hosted EC2 instance of Windows Server 2012 R2 and needed a good way to make sure the instance got backed-up nightly. The original box (&#8230;)</p><p><a href="http://www.noahlh.com/blog/2014/07/automated-windows-server-backups-on-aws-ec2/">Read the rest of this entry &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>I recently replaced an aging (and brittle&#8230;and risky) physical Windows box in our office with an AWS-hosted EC2 instance of Windows Server 2012 R2 and needed a good way to make sure the instance got backed-up nightly.</p>
<p>The original box was a simple Ubuntu server running VirtualBox-hosted Windows 7.  We had QuickBooks Enterprise running there, and the 3 folks who worked on accounting stuffs for us would login via Remote Desktop, do their thing, and sign off each night.  That box was running Dropbox and, in theory, should have automatically backed-up our QuickBooks file as soon as the file closed each night.</p>
<p>The problem, however, is that A) Dropbox isn&#8217;t daemon/service-based, so if the main user account got logged off for some reason, Dropbox would stop running, and B) Dropbox would only sync when the QuickBooks file was &#8220;closed&#8221;, which means all users had to remember to both close the file and log off each night.  In practice, this didn&#8217;t happen.</p>
<p>I felt like that box was a ticking time bomb of non-backed-up financial misery and was dreading getting that call:  &#8221;So the hard drives are making a weird sound and I can&#8217;t login to QuickBooks &#8211; what do I do?&#8221;</p>
<p>The solution:  Move everything to the cloud.  I spun up an Amazon EC2 Windows Server instance, attached some storage, setup RDS (a bit of a process which is the scope of another post), and got QuickBooks running on that server.</p>
<p>The next problem:  Amazon EC2 is truly &#8220;infrastructure&#8221;, which means there isn&#8217;t just a simple &#8220;automated backup&#8221; button (like there is with Microsoft Azure and most linux-based VPS hosts).  So I had to roll my own.</p>
<p>The best solution I came up with was to run a set of PowerShell scripts to automate the EBS snapshot process nightly.  Based on this excellent post:</p>
<p><a title="http://messor.com/aws-disaster-recovery-automation-w-powershell/" href="http://messor.com/aws-disaster-recovery-automation-w-powershell/" target="_blank">http://messor.com/aws-disaster-recovery-automation-w-powershell/</a></p>
<p>The issue with those scripts is that they were written for an old version of the AWS SDK (v1.0).  So I dug into the Windows PowerShell ISE, fired up the debugger, and got everything working with the latest version.</p>
<p>Lo and behold, an updated set of scripts.  Enjoy!</p>
<p><a title="https://github.com/noahlh/aws-automated-backup-powershell" href="https://github.com/noahlh/aws-automated-backup-powershell" target="_blank">https://github.com/noahlh/aws-automated-backup-powershell</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.noahlh.com/blog/2014/07/automated-windows-server-backups-on-aws-ec2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
