<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Shawn's MIIS/ILM Tricks, PKI Hints, and Résumé Writing Prevention Tips  : Backup/Restore</title><link>http://blogs.technet.com/shawnrab/archive/tags/Backup_2F00_Restore/default.aspx</link><description>Tags: Backup/Restore</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>RWPT - My Day Ruining Maneuver</title><link>http://blogs.technet.com/shawnrab/archive/2006/12/13/slackerific-day-ruining-maneuver.aspx</link><pubDate>Thu, 14 Dec 2006 06:15:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:554676</guid><dc:creator>shawnrab</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/shawnrab/comments/554676.aspx</comments><wfw:commentRss>http://blogs.technet.com/shawnrab/commentrss.aspx?PostID=554676</wfw:commentRss><description>&lt;P&gt;So here is a nice little tip that is a direct result of sleep deprivation and bad habit.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;I was working on some C# code that grabs some log files and wraps them up into a cab file and moves them off to a different location.&amp;nbsp; After that it clears the directory so new logs can be written.&amp;nbsp; In writing the code I figured I would take the liberty of trying to get&amp;nbsp;everything in the folder deleted except for the tool itself.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;So in thinking I&amp;nbsp;did this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;---snip---&lt;FONT color=#008080 size=2&gt;&lt;/P&gt;
&lt;P&gt;Directory&lt;/FONT&gt;&lt;FONT size=2&gt;.Delete(&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;Directory&lt;/FONT&gt;&lt;FONT size=2&gt;.GetCurrentDirectory(), &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;---end---&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where &lt;FONT color=#008080 size=2&gt;Directory&amp;nbsp;&lt;FONT color=#000000&gt;refers to System.IO.Directory&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;So I am trucking along, writing some other functionality and I finally compiled the code...&amp;nbsp; I fixed the compilation errors (usually missing semi-colons or curly brackets) and I went to test.&amp;nbsp; I had a test directory C:\testdir\testdata where the tool was to be run in testdir and the data to be put in the cab file was in testdata.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Of course&amp;nbsp;at 2:30am I am&amp;nbsp;not thinking about the code I wrote an hour or two before, nor do I think about running this under the debugger.&amp;nbsp; No I dragged the tool from the debug directory straight into a&amp;nbsp;default command prompt.&amp;nbsp; I was puzzled as the code&amp;nbsp;did not return.&amp;nbsp; So I went and looked at the code, thinking I might have done something wrong.&amp;nbsp; I spent about 10 minutes looking.&amp;nbsp; I figured it was hung somewhere so&amp;nbsp;I looked for any potential hanging points - maybe a for loop where I put a&amp;nbsp;greater than sign&amp;nbsp;where I needed a less than sign or something like that.&amp;nbsp; I went to control + C the running code and I caught a glimpse of my desktop... &lt;/P&gt;
&lt;P&gt;Zero icons.&amp;nbsp; Of course I had no browsing history anymore either.&amp;nbsp; No PST's.&amp;nbsp; No documents in the My Documents folder.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;My default command prompt centers at %userprofile%...&amp;nbsp; the "true" in the Directory.Delete means "go into all of the sub directories and torch everything."&lt;/P&gt;
&lt;P&gt;Luckily I had a fairly recent backup.&amp;nbsp; For the rest I used a third party file recovery tool.&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This posting is provided "AS IS" with no warranties, and confers no rights.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=554676" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/shawnrab/archive/tags/Visual+C_2300_/default.aspx">Visual C#</category><category domain="http://blogs.technet.com/shawnrab/archive/tags/Mistakes/default.aspx">Mistakes</category><category domain="http://blogs.technet.com/shawnrab/archive/tags/Backup_2F00_Restore/default.aspx">Backup/Restore</category></item><item><title>RWPT - Don't "Jack" it up, back it up!!!</title><link>http://blogs.technet.com/shawnrab/archive/2006/05/10/don-t-jack-it-up-back-it-up.aspx</link><pubDate>Wed, 10 May 2006 21:28:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:427905</guid><dc:creator>shawnrab</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/shawnrab/comments/427905.aspx</comments><wfw:commentRss>http://blogs.technet.com/shawnrab/commentrss.aspx?PostID=427905</wfw:commentRss><description>&lt;P&gt;I&amp;nbsp;spent almost 4 years in Microsoft Product Support Services.&amp;nbsp; I would take calls and fix problems.&amp;nbsp; One nice thing about PSS is that if you worked the night shift, they would give you a salary differential.&amp;nbsp; Being a younger employee and in need of some extra cash I would field night shift calls.&amp;nbsp; The night shift calls were often really nasty issues and there was one common theme when it came to most customers.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I am watching my favorite show on Monday night.&amp;nbsp; Being a Premier Field Engineer, I travel a ton and there's one constant rule that I follow.&amp;nbsp; Book your flights and make hotel arrangements around the show "24."&amp;nbsp; Yeah, a DVR is a good idea, but I have too many friends who text message me their reactions as the show happens.&amp;nbsp; I turn the phone off when I am on the West Coast...&amp;nbsp; Watching "24" the night of the show is the only acceptable workaround.&amp;nbsp; I can't go to work the next day without knowing the facts.&amp;nbsp; Anyway, I am watching "24" and the main character Jack finally acquired the evidence that implicates the Fictional President of the United States in all of the days actions.&amp;nbsp; It was a recording of the Fictional President talking to the bad guy.&amp;nbsp;&amp;nbsp;Jack had acquired&amp;nbsp;the recording&amp;nbsp;before in the season and then the&amp;nbsp;bad guy got it back and&amp;nbsp;during the&amp;nbsp;last episode a&amp;nbsp;different bad guy erased it.&amp;nbsp; WHY DIDN'T JACK MAKE A BACKUP??&lt;/P&gt;
&lt;P&gt;That bothers me that my fictional hero didn't make a backup.&amp;nbsp; Jack is like the unfortunate many of the customers who would call me at night.&amp;nbsp; There's really no excuse.&amp;nbsp; We provide a tool (ntbackup.exe) to do backups.&amp;nbsp; It's free, or at least it comes free with the purchase of Windows Server.&amp;nbsp; So why aren't you using this shiny toy that comes in the bottom of the cereal box?&amp;nbsp; &lt;/P&gt;
&lt;P&gt;So what is the excuse for not having a backup?&amp;nbsp; You didn't have time?&amp;nbsp; You were busy dodging bullets and running from the MAN?&amp;nbsp; Either way, don't get JACKED, make sure the data is BACKED!!&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;This posting is provided "AS IS" with no warranties, and confers no rights.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=427905" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/shawnrab/archive/tags/Mistakes/default.aspx">Mistakes</category><category domain="http://blogs.technet.com/shawnrab/archive/tags/Backup_2F00_Restore/default.aspx">Backup/Restore</category></item></channel></rss>