<?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>FamousPhil.com Admin Blog and More &#187; backup</title>
	<atom:link href="http://famousphil.com/blog/tag/backup/feed/" rel="self" type="application/rss+xml" />
	<link>http://famousphil.com</link>
	<description>My Personal Blog</description>
	<lastBuildDate>Tue, 08 May 2012 03:26:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Revisiting Exchange 2010 SP1 PST Backups (Improved Script)</title>
		<link>http://famousphil.com/blog/2011/07/revisiting-exchange-2010-sp1-pst-backups-improved-script/</link>
		<comments>http://famousphil.com/blog/2011/07/revisiting-exchange-2010-sp1-pst-backups-improved-script/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 01:33:16 +0000</pubDate>
		<dc:creator>Famous Phil</dc:creator>
				<category><![CDATA[Hosting / Server Administration]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[exchange 2010]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[pst]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://famousphil.com/?p=1096</guid>
		<description><![CDATA[Phil revisits his Exchange 2010 SP1 PST backup script and introduces some server optimization tricks and an improved powershell script that emails detailed backup completion statuses. ]]></description>
			<content:encoded><![CDATA[<p>Over the past couple of months, I&#8217;ve found that the script that I posted at <a href="http://famousphil.com/blog/2011/01/a-decent-backup-strategy-for-exchange-2010-sp1/">http://famousphil.com/blog/2011/01/a-decent-backup-strategy-for-exchange-2010-sp1/</a> hasn&#8217;t been working perfectly for my needs.  This relatively short blog is kind of a back track blog to explain the issues and provide some fixes for them.</p>
<p>The original script I posted does not verify that the backups actually completed.  The emails I got were simply gibberish.  I was willing to accept that for a while until during monthly maintenance when I manually verify backups, I was finding that backups didn&#8217;t always complete.  I&#8217;ve tracked this down in the error logs and found that the memory in the server isn&#8217;t enough for the backups at times which has them fail at certain times.  Due to the lack of user base on my server (4 light users), I can&#8217;t justify adding more ram (I currently have 4GB) because I&#8217;d have to upgrade the entire server.  So instead, I did some RAM optimization and re-wrote the backup script to email me the actual backup names that completed successfully.</p>
<p>First for the tips.  I recently learned that Active Directory can be modified from the backend, so using this, I modified the Information Store service (store.exe) in Exchange to only use at most 512MB of ram.  I used the information at <a href="http://terrytlslau.blogspot.com/2011/03/limiting-exchange-server-2007-and-2010.html">http://terrytlslau.blogspot.com/2011/03/limiting-exchange-server-2007-and-2010.html</a> for doing this, I briefly repeat the procedure here in the even that this link is no longer reachable.</p>
<pre class="brush: bash; title: ; notranslate">
1. At Domain Controller, login as a Domain Administrator.
2. Click &quot;Start&quot;, enter &quot;adsiedit.msc&quot; into the search box, hit enter.
3. Right-click &quot;ADSI Edit&quot;, select &quot;Connect to&quot;.
4. Enable the Naming Context view, click ok to connect
4. Under the &quot;Naming Context&quot; menu, select &quot;Configuration&quot;.
6. Expand to &quot;Configuration &gt; Services &gt; Microsoft Exchange &gt;  &gt; Administrative Groups &gt; Exchnage Administrative Group &gt; Servers &gt;  &gt; InformationStore&quot;.
7. Right-click &quot;InformationStore&quot;, select &quot;Properties&quot;.
8. Select &quot;msExchESEParamCacheSizeMax&quot;.
9. This value is set in pages, in Exchange 2010 the size is 32KB/page; Exchange 2007 is 8KB/page.  Simply figure out the number of pages for the amount of ram you want to limit store.exe to using.

For instance, if you want to limit the Database Cache to 4 GB of an Exchange 2010 server, set msExchESEParamCacheSizeMax to 131072 (4 GB = 4.194.304 KB / 32 KB). If you want to limit the Database Cache to 2 GB of an Exchange 2007 server, set msExchESEParamCacheSizeMax to 262144 (2 GB = 2.097.152 KB / 8KB).
10. Ok everything and restart the Information Store service (possibly the server)
</pre>
<p>After limiting the Exchange Information Store service, I simply restarted the Information Store service and that seems to have fixed the gouging memory issue.</p>
<p>As a second optimization procedure, I started tackling the IIS Worker Processes.  Exchange has several application pools that it uses, you can think of an application pool in IIS as a separate instance of Tomcat or Apache for each website.  Application Pools isolate websites to that they can&#8217;t affect each other.  On the downside, application pools also hog a great amount of memory and for the features of Exchange that you may not use often (e.g. powershell, calendar, exchange control panel), it takes some time for these features to load initially (for me, its about 30 seconds).  My solution was to limit Exchange to two application pools.  For anything service related, I used the Exchange Service Pool (e.g. EWS, Powershell, Autodiscover), and anything client site based (e.g. OWA, Calendar, ECP, ActiveSync) in the OWA pool.  I still do not know if any update to Exchange may reverse this or break this, but I do keep it in mind during updates.  The result of doing this is that not only is memory consumption reduced significantly, but Outlook Web Access, Exchange&#8217;s Calendar display (for the public), and Exchange Control Panel all load much faster now since the overhead in IIS is already loaded.  Of course, I wouldn&#8217;t recommend doing this unless you can&#8217;t easily upgrade the amount of memory in your server.</p>
<p>Finally, I will leave you with an improved export script that replaces the script in my previous blog at <a href="http://famousphil.com/blog/2011/01/a-decent-backup-strategy-for-exchange-2010-sp1/">http://famousphil.com/blog/2011/01/a-decent-backup-strategy-for-exchange-2010-sp1/</a>.  This script verifies that all of the users were actually uploaded and emails the complete report to you (instead of some garble).  I&#8217;ve found it to be very helpful in determining if a mailbox was failing to export to a PST without having to login to the file server and check.  As always, use this script at your own risk, I am willing to provide limited support as time permits.</p>
<pre class="brush: powershell; title: ; notranslate">
# Exchange 2010 SP1 Mailbox Export Script
# Originally from Steve Goodman.
# Modified by Philip Matuskiewicz for Matthouse.us / famousphil.com 1/2/11 FIXED *7/2/11*

#define information here
$server = &quot;host.example.com&quot; #server hostname
$users = @(&quot;Joe&quot;, &quot;Mary&quot;, &quot;Phil&quot;) #users to archive
$destination = &quot;localhostpstbackups&quot; #network share to backup to
$emailfrom = &quot;server@yourdomain.com&quot;
$emailto = &quot;you@yourdomain.com&quot;
#define some internal variables
$output = &quot;&quot;
$error = 0
$date = Get-Date

#check for errors
if (!(Get-ExchangeServer $server -ErrorAction SilentlyContinue)){
    $output += &quot;Exchange Server $server not found`n&quot;;
	$error = 1
}
if (!(Get-MailboxDatabase -Server $server -ErrorAction SilentlyContinue)){
    $output += &quot;Exchange Server $server does not have mailbox databases&quot;;
	$error = 1
}

#create a batch job if the above tests succeeded
if ($error -ne 1){

	$jobname = &quot;Export_$($date.Year)-$($date.Month)-$($date.Day)_$($date.Hour)-$($date.Minute)-$($date.Second)&quot;
	$output += &quot;Job title is: '$($jobname)' `n&quot;
	Write-Output &quot;Job title is: '$($jobname)' &quot;

	foreach ($mailbox in $users){
		#remove existing PST file
		if (Get-Item &quot;$($destination)$($mailbox).PST&quot; -ErrorAction SilentlyContinue){
			Remove-Item &quot;$($destination)$($mailbox).PST&quot; -Confirm:$false
			$output += &quot;Existing PST was deleted (Normal): '$($mailbox)' `n&quot;
			Write-Output &quot;Existing PST was deleted (Normal): '$($mailbox)' &quot;
		} # end if

		#request a backup of the mailbox, Exclude the recoverable items / deleted items
		$mailboxjobname = &quot;$($mailbox)-$($jobname)&quot;
		New-MailboxExportRequest -BatchName $jobname -Mailbox $($mailbox) -FilePath &quot;$($destination)$($mailbox).PST&quot; -ExcludeDumpster -Name $mailboxjobname
		$output += &quot;Mailbox Queued: '$($mailbox)' `n&quot;
		Write-Output &quot;Mailbox Queued: '$($mailbox)' &quot;

	} #end foreach
} #end $error -ne 1

#wait for the jobs to complete
$time = 0;
while ((Get-MailboxExportRequest -BatchName $jobname | Where {$_.Status -eq &quot;Queued&quot; -or $_.Status -eq &quot;InProgress&quot;})){
	Write-Output &quot;Waiting on backup, it has been $($time) seconds&quot;
	$output += &quot;Waiting on backup, it has been $($time) seconds `n&quot;
	sleep 600 #10 minutes
	$time = $time + 720;
} #end while

#check for any jobs that didn't complete
$incomplete = Get-MailboxExportRequest -BatchName $jobname | Where {$_.Status -ne &quot;Completed&quot;} | Get-MailboxExportRequestStatistics | Format-List
$complete = Get-MailboxExportRequest -BatchName $jobname | Where {$_.Status -eq &quot;Completed&quot;} | Get-MailboxExportRequestStatistics | Format-List

if($incomplete){
	Write-Output &quot;ERROR: Something didn't complete, output is '$($incomplete)'&quot;
	$output += &quot;ERROR: Something didn't complete, output is '$($incomplete)' `n&quot;
}

if($complete){
	Write-Output &quot;Completed Successfully, output is '$($complete)'&quot;
	$output += &quot;Completed Successfully, output is '$($complete)' `n&quot;
}

# Remove Requests and clean up
Write-Output &quot;Cleaning up requests that were part of the job '$($jobname)'&quot;
$output += &quot;Cleaning up requests that were part of the job '$($jobname)' `n&quot;
Get-MailboxExportRequest -BatchName $jobname | Remove-MailboxExportRequest -Confirm:$false

#verify that all the PST files were created...
foreach ($mailbox in $users){
		#remove existing PST file
		if (Get-Item &quot;$($destination)$($mailbox).PST&quot; -ErrorAction SilentlyContinue){
			$output += &quot;PST FOUND!!!: '$($mailbox)' `n&quot;
			Write-Output &quot;PST FOUND!!!: '$($mailbox)' &quot;
		}else{
			$output += &quot;ERROR: PST NOT FOUND: '$($mailbox)' `n&quot;
			Write-Output &quot;ERROR: PST NOT FOUND: '$($mailbox)' &quot;
		}
}

$SmtpClient = new-object system.net.mail.smtpClient(&quot;double.matthouse.org&quot;)
$msg = new-object Net.Mail.MailMessage
$msg.From = &quot;$($emailfrom)&quot;
$msg.To.Add(&quot;$($emailto)&quot;)
$msg.Subject = &quot;EXCHANGE EMAIL BACKUP DETAILS&quot;
$msg.Body = $output
$SmtpClient.Send($msg)

Write-Output &quot;Script complete!&quot;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://famousphil.com/blog/2011/07/revisiting-exchange-2010-sp1-pst-backups-improved-script/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>A Decent Backup Strategy for Exchange 2010 SP1</title>
		<link>http://famousphil.com/blog/2011/01/a-decent-backup-strategy-for-exchange-2010-sp1/</link>
		<comments>http://famousphil.com/blog/2011/01/a-decent-backup-strategy-for-exchange-2010-sp1/#comments</comments>
		<pubDate>Tue, 11 Jan 2011 23:37:35 +0000</pubDate>
		<dc:creator>Famous Phil</dc:creator>
				<category><![CDATA[Hosting / Server Administration]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[exchange 2010]]></category>
		<category><![CDATA[Firewall]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[scp]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://famousphil.com/?p=613</guid>
		<description><![CDATA[Phil explains his backup routine for Exchange 2010 and some of the possible complications from it for the benefit of the reader.]]></description>
			<content:encoded><![CDATA[<p><strong>There is a new blog with additional information on this topic at <a href="http://famousphil.com/blog/2011/07/revisiting-exchange-2010-sp1-pst-backups-improved-script/">http://famousphil.com/blog/2011/07/revisiting-exchange-2010-sp1-pst-backups-improved-script/</a></strong></p>
<p>About a week ago, I finally got around to reviewing and upgrading my existing backup routine for my exchange server.  My previous backup scheme involved pushing a full server backup image to a remote server on a weekly basis.  If the server failed during a backup, I would have no viable way of recovering from a complete disaster.  Obviously, this required some changes.</p>
<p>With the release of SP1 for Exchange 2010, a few new power shell commandlets came out that provide functionality to back up Exchange accounts directly on the server (no needing second computer with outlook and exchange management tools anymore!).  This meant that I decided to utilize some backup scripts that backup each mailbox nightly.  I also modified the weekly system backup.</p>
<p>There are scripts attached to this post.  With any kind of solution that I provide, I always provide it on an as is basis with no warranty provided that it will work for your situation, although I try my best to cover as many scenarios as I can.</p>
<p>So what was decided upon?<span id="more-613"></span></p>
<p><strong>Full Image Backup</strong>: On the local Exchange front, I opted to make the monthly full system image backup run the first Sunday of every month.  It is configured to back up to a network share that is actually on the same server.  When backing up to a local drive, Windows Backup typically appends to the backup and I prefer to have the previous backup removed so that disk space usage is minimized.  The full backup takes about 25 minutes to complete and is stored locally.</p>
<pre class="brush: bash; title: ; notranslate">
rmdir /S /Q localhostbackupwinbackup
mkdir localhostbackupwinbackup
C:WindowsSystem32wbadmin.exe START BACKUP -backupTarget:localhostbackupwinbackup -vssFull -allcritical -quiet
</pre>
<p>Then, on the eighth day of each month, my Linux-based backup server connects via SCP to pull the monthly image that was created.  Technically, it would take a dual hard drive failure (both the system drive, and backup drive) to completely render the system un-restorable with this scheme.  It is very rare to see a dual drive failure, but if it were to occur, I still would have the nightly backups to fall back on and it might take about 5 to 10 hours more to complete a restoration.</p>
<p>SCP as I’ve mentioned in the past is a way to copy files between two Linux based servers securely.  It operates using the SFTP protocol which runs on top of SSH.  Remember that SSH is a way to bring up a command prompt that runs on the remote system.  Since Windows doesn’t natively support any decent secure file transfer techniques that I’m aware of, I installed copssh (<a href="http://www.itefix.no/i2/copssh">http://www.itefix.no/i2/copssh</a>), which is a Cygwin based solution for Windows that supports SSH and SFTP (and ultimately the SCP command).  With Cygwin working on the Exchange server, I added a user to Cygwin with bash shell access and I firewalled port 22 to where only the remote backup server could connect (for security reasons mostly).  I will leave the actual SCP script writing up to the reader, although here is a helpful page (<a href="http://en.wikipedia.org/wiki/Secure_copy">located here</a>).  I will also hint that the reader will need to learn about public keys to allow for a passwordless remote ssh login so that sftp doesn&#8217;t prompt for a password when ran as a cron job.</p>
<p><strong>Nightly Backup: </strong>When Exchange 2010 SP1 was released, several commandlets were created in powershell which allow for the export of PST files without needing Outlook installed on the same computer (which should never be installed on an exchange server directly).</p>
<p>I’ve found that in my initial testing of the PST export, there is a fairly large performance hit on the server, so I recommend doing it at the least used hour available.  I’ve also found that it takes a fair amount of time (10 minutes or so) and cpu power to export a large mailbox (> 1GB).  I also found that when restoring (importing) a PST, it can only be imported to another folder of the mailbox, it cannot overwrite existing mail in the box (I guess this is a good thing and a bad thing).</p>
<p>Anyways, I managed to find how to do a mass export using powershell at <a href="http://www.stevieg.org/2010/07/using-the-exchange-2010-sp1-mailbox-export-features-for-mass-exports-to-pst/">Steve Goodman’s Tech Blog</a>.  I modified the script because his script included mailboxes that I didn’t care about (such as alias boxes, the discovery box, etc).  My Script takes in a constant array of usernames (mailbox alias names) and only backs up those boxes sequentially (posted with this article).  This happens nightly at 12:45am since that is the least active time for my system.  I chose to export to the same local drive as my other backups so that they could be pulled in by my backup server (via SFTP).  This maintains security of all the email data I handle.</p>
<p>The first task when implementing this backup plan is to set appropriate permissions to make the backup work.  The folder or server share (in my case) where the export will be saved needs to have the modify permission set for the Exchange Trusted Subsystem.  Remembering my firewall woes post, make sure that file and printer sharing rules are present in the firewall (even if you have custom rules and disable the default rules), otherwise you will get an illegal exception error without any real clue for what the problem is.  Then, within exchange’s powershell interface, the user who will be running the export commandlet will need to have permissions set.  This can be done by the command:</p>
<pre class="brush: powershell; title: ; notranslate">
New-ManagementRoleAssignment –Role “Mailbox Import Export” –User “ADAdmin”
</pre>
<p>Next, it is probably helpful to get a listing of all the mailboxes so that we know the aliases of each mailbox that needs to be backed up.  I will note that I’ve also noticed that lower/upper case doesn’t matter on Windows Powershell like it would on a Linux based shell.  The command to get the listing is:</p>
<pre class="brush: powershell; title: ; notranslate">
get-mailbox
</pre>
<p>Using the output of the Alias column, you should be able to fill in the script that I’ve modified (from Steve Goodman) and have it run.  At the end of a successful run, I have powershell send me an email telling me if the job was completed successfully or not.  I’ve noticed that my spam filters caught that email, so I added an exception for my Exchange server.  The end of this post has the actual script, and the source can be found here.   The email portion of my script initially threw errors to me, eventually I used telnet to test if port 25 was open and I discovered that it wasn’t.  It turns out that my exchange server was not listening on port 25 of the localhost address.  If you run into this situation, I’d recommend checking that or the firewall before jumping to conclusions.  Telnet is a very powerful tool!</p>
<p>Last but not least, I pull the nightly backups from Exchange every day at 8am, well after the nightly backup is finished.  The script that pulls these backups is very similar to the monthly script but it copies the existing daily backup to a weekly retention folder every Sunday before it begins grabbing the latest nightly backup.  I’ve included that script below for your reference.</p>
<p><strong>Conclusion</strong>: Backups are a necessary part of any viable disaster recovery plan.  I’ve outlined one above that I use on my own systems.  I’m sure it isn’t perfect, but it’s well thought out and I have used it to recover systems in full before.  As with any backup plan, I usually always test it out immediately after its implementation to verify that it will work in the event of a disaster.  As a system admin, I never want to be left holding onto a faulty backup that I believe worked and I’m sure that you can also appreciate this thinking.</p>
<pre class="brush: bash; title: exchangedaily.sh; notranslate">
#Crontab Entry
#5 8 * * * /back/exchangedaily.sh  | mail -s &quot;daily exchange offsite backup finished&quot; phil@matthouse.us
#!/bin/bash
cd /backup/exchange
if [ $(date +%A) = &quot;Sunday&quot; ]
then
        rm -Rf weekly
        mv daily weekly
        mkdir daily
        cd daily
else
        rm -Rf daily
        mkdir daily
        cd daily
fi
scp -r admin@matthouse.org:/cygdrive/e/bck/pstbackup ./
</pre>
<p><strong>This script has been updated:  <a href="http://famousphil.com/blog/2011/07/revisiting-exchange-2010-sp1-pst-backups-improved-script/">http://famousphil.com/blog/2011/07/revisiting-exchange-2010-sp1-pst-backups-improved-script/</a></strong></p>
<pre class="brush: powershell; title: MassExport.ps1; notranslate">
# Exchange 2010 SP1 Mailbox Export Script
# Steve Goodman. Use at your own risk! - modified by Philip Matuskiewicz for Matthouse 1/2/11

#create a .cmd file with the following line to invoke this:
#C:WindowsSystem32WindowsPowerShellv1.0powershell.exe -command &quot;. 'c:Program FilesMicrosoftExchange ServerV14binRemoteExchange.ps1'; Connect-ExchangeServer -auto; .MassExport.ps1&quot;

#what to back up from?
$Server = &quot;exchangeserver.matthouse.org&quot;

#who to backup, use the alias from commandlet Get-Mailbox -Server $Server (replace $server appropriately)
$USRALIAS = @(&quot;FamousPhil&quot;, &quot;MyUserOne&quot;, &quot;Staff &quot;, &quot;AnotherUSER&quot;)

# Share to export mailboxes to. Needs R/W by Exchange Trusted Subsystem
$ExportShare = &quot;localhostbackuppstbackup&quot;

#error checking

    if (!(Get-ExchangeServer $Server -ErrorAction SilentlyContinue))
    {
        throw &quot;Exchange Server $Server not found&quot;;
    }
    if (!(Get-MailboxDatabase -Server $Server -ErrorAction SilentlyContinue))
    {
        throw &quot;Exchange Server $Server does not have mailbox databases&quot;;
    }
# Make batch name
$date=Get-Date
$BatchName = &quot;Export_$($date.Year)-$($date.Month)-$($date.Day)_$($date.Hour)-$($date.Minute)-$($date.Second)&quot;

        Write-Output &quot;Queuing Pre-defined mailboxes as batch '$($BatchName)' sequentially&quot;

foreach ($element in $USRALIAS)
{

        if (Get-Item &quot;$($ExportShare)$($element).PST&quot; -ErrorAction SilentlyContinue)
        {
                Remove-Item &quot;$($ExportShare)$($element).PST&quot; -Confirm:$false
        }
        New-MailboxExportRequest -BatchName $BatchName -Mailbox $($element) -FilePath &quot;$($ExportShare)$($element).PST&quot;

        while ((Get-MailboxExportRequest -BatchName $BatchName | Where {$_.Status -eq &quot;Queued&quot; -or $_.Status -eq &quot;InProgress&quot;}))
        {
                Write-Output &quot;Waiting on backup of $($element), refreshing every 60 seconds&quot;
                sleep 60
        }
}

###REPLACE SMTP SERVER, FROM, and TO addresses and potentially subjects below.

        $SmtpClient = new-object system.net.mail.smtpClient(&quot;exchangeserver.com&quot;)
        $msg = new-object Net.Mail.MailMessage
        $msg.From = &quot;phil@matthouse.us&quot;
        $msg.To.Add(&quot;phil@matthouse.us&quot;)

    $Incomplete = Get-MailboxExportRequest -BatchName $BatchName | Where {$_.Status -ne &quot;Completed&quot;} | Get-MailboxExportRequestStatistics | Format-List
    if ($Incomplete)
    {
        Write-Output &quot;Process didn't complete, Emailing report to admin&quot;
        $msg.Subject = &quot;Double.matthouse.org Backup Incomplete&quot;
        $msg.Body = $Incomplete
        $SmtpClient.Send($msg)
    }

    $Completed = Get-MailboxExportRequest -BatchName $BatchName | Where {$_.Status -eq &quot;Completed&quot;} | Get-MailboxExportRequestStatistics | Format-List
    if ($Completed)
    {

        Write-Output &quot;Backup done, sending the report to admin&quot;
        $msg.Subject = &quot;Double.matthouse.org Backup Complete&quot;
        $msg.Body = $Completed
        $SmtpClient.Send($msg)
    }

# Remove Requests and clean up
Write-Output &quot;Removing requests created as part of batch '$($BatchName)'&quot;
Get-MailboxExportRequest -BatchName $BatchName | Remove-MailboxExportRequest -Confirm:$false

Write-Output &quot;Process complete!&quot;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://famousphil.com/blog/2011/01/a-decent-backup-strategy-for-exchange-2010-sp1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Online Backup: Avoiding Disaster</title>
		<link>http://famousphil.com/blog/2010/07/online-backup-avoiding-disaster/</link>
		<comments>http://famousphil.com/blog/2010/07/online-backup-avoiding-disaster/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 16:32:23 +0000</pubDate>
		<dc:creator>Famous Phil</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[alexis bonari]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[disaster]]></category>
		<category><![CDATA[guest post]]></category>

		<guid isPermaLink="false">http://famousphil.com/?p=469</guid>
		<description><![CDATA[A guest poster, Alexis Bonari, has graciously contributed a post about online backup solutions for home users!]]></description>
			<content:encoded><![CDATA[<p>I am delighted today to bring you a guest posting from Alexis Bonari!</p>
<p>Anyone who does any sort of work on their computer can tell you a hard drive crash is the stuff nightmares are made of.  While it’s easy to pass judgment on such individuals for failing to use an external hard drive, doing so is admittedly time-consuming and, in some cases, expensive.</p>
<p>The solution: online backup sites. For a small fee, these off-site servers back up all data stored on the computer in case of a hard drive failure.  Here are the top three such services and what they have to offer:</p>
<p>1. Carbonite<br />
(http://www.carbonite.com/en/default.aspx)<br />
For only $54.95/ year, Carbonite offers unlimited backup on their server.  No matter what your computer’s storage limit, the Carbonite system can handle it.  For security purposes, files are encrypted before being sent to the Carbonite server for storage. For ease of use, the files are automatically backed up each time the computer is connected to the Internet. Restoring the files is as simple as logging into the Carbonite website and clicking the “restore” button listed on your account.</p>
<p>2. MozyHome Free<br />
(http://mozy.com/home/free)<br />
Unlike Carbonite, Mozy doesn’t charge a fee for the first 2 GB backed up.  The system for retrieving files and backing them up is essentially the same the one used by Carbonite.  If you want to store more than 2 GB, Mozy charges $4.95/month.  This gives you unlimited data storage for only slightly more per year than Carbonite.</p>
<p>3. SugarSync<br />
(https://www.sugarsync.com/)<br />
Many experts believe that online syncing represents the future of online backup technology.  SugarSync.com is the current leader in online syncing technology. Instead of simply backing up a set of files on one computer, SugerSync notifies other computers and devices you’ve listed of any changes made. You can work from nearly anywhere in the world and have your files backed up in real-time by the Sugarsync server.  Devices supported include Mac’s, PC’s, Ipads, smart phones, and many others.</p>
<p>Those who sign up get a 30 day free trial.  After that, the price goes up to $10/month for 60 GB of storage.  While the limited storage and the higher price might be prohibitive for some customers, many are happy to pay extra for the ability to sync documents over multiple devices.</p>
<p>Bio: Alexis Bonari is a freelance writer and blog junkie. She spends much of her days blogging about Education and <a href="http://www.collegescholarships.org">CollegeScholarships</a>. In her spare time, she enjoys square-foot gardening, swimming, and avoiding her laptop.</p>
]]></content:encoded>
			<wfw:commentRss>http://famousphil.com/blog/2010/07/online-backup-avoiding-disaster/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Backup Dangers</title>
		<link>http://famousphil.com/blog/2010/03/backup-dangers/</link>
		<comments>http://famousphil.com/blog/2010/03/backup-dangers/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 19:41:59 +0000</pubDate>
		<dc:creator>Famous Phil</dc:creator>
				<category><![CDATA[Hosting / Server Administration]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[hacker]]></category>
		<category><![CDATA[hard drive failure]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://famousphil.com/?p=437</guid>
		<description><![CDATA[Phil discusses a few dangers that he found in his backup system and explains how to back up MySQL appropriately.]]></description>
			<content:encoded><![CDATA[<p>Today, I will pursue a topic that all of us wish wasn&#8217;t necessary to discuss, but it is a fact of life.  Backups are required in life and this isn&#8217;t a new concept, but poor backups can be devastating when you find out that it doesn&#8217;t work (and that is usually when you need it the most).  I&#8217;ve spent a lot of time making changes to my backup systems over the years, but they are never perfect and I constantly find new flaws that I constantly work to fix.</p>
<p>A few weeks ago, I found a major flaw in my backup system that I never really thought about in the past.  My backups would run every night by essentially pushing the latest backup to another server that I run.  This server had an account on it where the backup would neatly upload then not be touched again until the next backup cycle ran.  To access the backup, all I had to do is login as root on my production system (the system that runs famousphil), then request the backup.  Passwords are entirely controlled through keys, so I didn&#8217;t have to do anything special or know anything to gain access to my backup server.  Unfortunately, if all I needed was my root password / key to do that, if a hacker got into my system, they essentially could completely destroy my backup system as well.</p>
<p>With the ever growing threat of hackers attempting to compromise my network of servers, I&#8217;ve began giving more thought to hack attempts and prevention along with hard disk and other physical server failures (which also happen).  Because of these thoughts, I&#8217;ve implemented a new backup routine that fixes most of my issues with a hacker gaining access to my network.  If I discover a hacker has penetrated one of my servers within 12 hours, I will always be able to restore a backup that is no more than 3 days old now.  The same goes for a hard disk failure / natural disaster. I do not feel it is in the best interest of Matthouse to disclose the new backup system and exact scheduled times, but I thought that it would be appropriate to share a little insight into that thought that I&#8217;m sure many other system administrators might fall into at one point or another.</p>
<p>Another threat that I found with my backup system was that part of my backups were incomplete.  For any admin that thinks backing up /var/lib/mysql is appropriate to backup MySQL, think again.  About 2 months ago, I thought this was appropriate, so I began backing up MySQL this way (I never really thought to check it initially since the server was brand new).  I normally check the redundancy of my backups about once every 2-3 months.  During my redundancy check, I always check everything and I discovered that I could not restore the MySQL database server from that directory easily.  Since I have the original server still running, I came up with a new backup procedure that works much better and can actually be restored.</p>
<p>For all of you who need to backup an entire MySQL server, here are the 2 commands that will help:</p>
<ul>
<li><strong>Backup: mysqldump -u root -pPASSWORD &#8211;all-databases > backup.sql</strong></li>
<li><strong>Restore: mysql -u root -pPASSWORD < backup.sql</strong></li>
</ul>
<p>Those are the 2 major points I wanted to make in this post.  In conclusion, I recommend that you make a backup schedule for your servers and verify that loop holes don&#8217;t exist in it.  I&#8217;m constantly looking for loop holes and I patch them as I find them.  Also, verify your backups!  I would have never realized that MySQL wasn&#8217;t being backed up unless it was for verifying that my backups are in tact and can be restored.  I verify my backups every other month and I recommend that every system admin does so.</p>
<p>For anyone at home, <strong>HARD DRIVES DO FAIL</strong>.  I strongly recommend keeping any data that you could not afford losing on a flash drive or external hard drive where if your computer did fail, you would still have your data.  <strong>Unfortunately, data is unrecoverable at cheap rates, making a backup is a cheap insurance policy to avoid complete disaster!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://famousphil.com/blog/2010/03/backup-dangers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Win Serv 2003 Backups over a network w/out being logged in</title>
		<link>http://famousphil.com/blog/2009/07/win-serv-2003-backups-over-a-network-wout-being-logged-in/</link>
		<comments>http://famousphil.com/blog/2009/07/win-serv-2003-backups-over-a-network-wout-being-logged-in/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 18:05:03 +0000</pubDate>
		<dc:creator>Famous Phil</dc:creator>
				<category><![CDATA[Hosting / Server Administration]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mapped network drive]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[ntbackup]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[server 2003]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://famousphil.com/blog/?p=233</guid>
		<description><![CDATA[Phil goes into technical details of how to backup a Windows server using the ntbackup utility over a network link without having to be logged into the server.]]></description>
			<content:encoded><![CDATA[<p>As you probably know by now, I have a Microsoft Exchange 2007 server.  With any kind of server, a backup and disaster recovery plan is a vital part of any kind of professional hosting.  Hosting email can be quite tricky as it is, but taking network backups was a new road that I&#8217;ve never covered in Windows.</p>
<p>First, I have a fairly simple environment set up for my backup.  I have a Linux backup server running samba sitting in Seattle (mthsweb2).  This server has the Windows IP white listed so that only my Windows server can connect to it to map a network share.  For those of you who don&#8217;t know what samba is, samba is a daemon in Linux that will allow Windows to naively connect to a Linux server for file sharing.  Samba is a very simple solution for mapping a network drive to Linux in Windows without needing any specialized software such as sftpdrive (not called something else).</p>
<p><span id="more-233"></span></p>
<p>I want to connect Windows to Linux so I mapped a network drive on the Windows server (and I made sure reconnect at login was checked).  I logged in using the proper credentials and saved them to my Windows user account.  I then proceeded to setup NTBackup (the Windows server backup utility).  Configuring NTBackup was quite simple, a few next&#8217;s and a couple of checks on my exchange server information, system state, and a few very important directories that hold onto ssl certificates for the server.  Naturally, the backup ran fine while I was logged in.  The problem was, when I was logged off the server, the backup failed because the network drive wasn&#8217;t there.</p>
<p>After some research, I found an easy way to solve this via batch scripting.  I could schedule a task in Windows that would run the batch script which would map the network drive for my system and execute NTBackup.  Below is the script  (you will need to customize the bold parts as described below):</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
@echo off</p>
<p>net use z: <strong>server</strong><strong>backup </strong>/persistent:yes</p>
<p><strong>C:WINDOWSsystem32ntbackup.exe backup &#8220;@C:Documents and SettingsadminLocal SettingsApplication DataMicrosoftWindows NTNTBackupdatad.bks&#8221; /a /d &#8220;Set created 7/10/2009 at 1:49 PM&#8221; /v:no /r:no /rs:no /hc:off /m normal /j &#8220;d&#8221; /l:s /f &#8220;C:Documents and SettingsadminMy DocumentsBackup.bkf&#8221;</strong></p>
<p>net use z: /d /y</p>
<p>exit<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Now that we have a script, what do we put in place of the bold remarks?  <strong>Server </strong>should be the IP Address of your remote file server.  This can either be a Linux server running samba or a Windows File Server.  Either method will require that you open up a range of file sharing ports on your firewall, I tend to just whitelist the ip of the server doing the backup from the backup server&#8217;s firewall.  If you are curious of the ports, I believe you need TCP ports 135-139 open for Windows file sharing to work, but there may be more.    The bolded <strong>backup</strong> is the path from the file sharing server to where you want to store your backup.</p>
<p>To get the <strong>other bolded part</strong>, you will need to login to Windows and map a network drive under the letter you used in the script (Z in this case).  Once the drive is mapped, make sure you save your login credidentials.  Now goto the system backup utility in start>programs>accessories>system.  Select your desired backup files and when you get to the location selection screen, make sure you save to the network drive letter you created.  Then when you get to the finish screen, click advanced.  Do a normal backup appending to existing backups (or whatever you desire).  Schedule the job for later (try a few days or a week later).  You will need to type in your username / password up to 4 times until you get past this screen to the finish screen.   Once done configuring your backup, goto start>programs>accessories>system -> scheduled tasks.  Double click the backup you made and you should see something like the blurb in the batch script above.  You will need to copy this entire line and paste it into this batch script.  After you have this line successfully saved into your script, you should disconnect the drive letter from my computer by right clicking the drive and selecting disconnect.</p>
<p>Now take the entire composed batch script and paste it into a new notepad document.  Now goto file > save as on notepad and save it to a file like backup.bat in the c drive or someplace where it will be easily findable.</p>
<p>Now you can go back to the scheduled tasks, remove that backup job (its not needed anymore) and remove it from the recycle bin.  Now create a new scheduled task.  This time select the bat script you made and schedule it as needed.  Its a fairly simple set of on screen instructions to follow.  Once this task is scheduled you&#8217;re all set.</p>
<p>If you wish to test the batch script before making it a scheduled task, simply click on it and your backup should run perfectly.</p>
<p>Thats all there is to it.  This was a 5 minute fix for me and I no longer have to worry about finding a third party solution to making stable backups of my operating system.  In addition to this backup method, you might want to look into running a mirror where 2 drives copy each other live.  This will also prevent against data loss provided there isn&#8217;t any danger in the server room such as fire or water damage.</p>
]]></content:encoded>
			<wfw:commentRss>http://famousphil.com/blog/2009/07/win-serv-2003-backups-over-a-network-wout-being-logged-in/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: famousphil.com @ 2012-05-22 18:40:38 by W3 Total Cache -->
