Georged Weblog

Have you georged your mind?
Lorem ipsum dolor sit amet
While creating customer's web site, I needed some words to fill in the content until customer comes up with the goods. You're may be aware that typesetters and publishers used "Lorem ipsum dolor sit amet..." since 16th century. But, in a good tradition of code generation, this is what I found. Added to the list of my development bookmarks. Just do not try to spellcheck it :-)
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis viverra tortor quis erat. Donec dolor. Praesent vestibulum nonummy ipsum. Nunc nonummy elementum velit. Mauris lorem metus, feugiat eget, scelerisque eu, vulputate sed, lorem. Morbi id tellus vel risus ornare laoreet. Integer justo nibh, semper sit amet, vestibulum id, mattis sit amet, elit. Etiam id massa. Nulla ultrices, diam in commodo semper, elit nunc ornare metus, at volutpat wisi lectus quis risus. Nunc convallis eleifend nibh. Praesent aliquet dolor vel pede. Sed nunc nulla, commodo eu, blandit ut, vulputate in, sem.
 
Praesent eget dolor vitae quam suscipit rhoncus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Vivamus non ipsum eget wisi venenatis semper. Nullam quis massa ut tortor eleifend imperdiet. Suspendisse lectus tellus, pharetra ut, faucibus eu, adipiscing quis, felis. In eget sem ac nibh semper malesuada. Ut et turpis. Vivamus ullamcorper, nulla nec dictum vehicula, pede massa ornare purus, sed ullamcorper dolor wisi eu sem. Proin lacinia, libero eu vulputate imperdiet, enim eros interdum tellus, sed porttitor nunc libero ut pede. Vivamus elit. Proin tempus orci quis magna. Pellentesque aliquam dignissim massa. Etiam luctus mauris sed lectus. Aenean vitae leo. Morbi sit amet ante sed purus iaculis aliquet. Nulla eu nisl vel arcu vehicula malesuada. Aenean quis sem. Quisque justo.
 
Suspendisse vitae dolor sed mauris lacinia iaculis. Nunc consectetuer orci et turpis. Aenean gravida ullamcorper urna. Duis a libero. Integer lectus est, egestas ac, suscipit ac, accumsan sit amet, justo. Proin ante arcu, tincidunt eget, vestibulum et, accumsan eget, justo. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Pellentesque aliquet dictum orci. Ut ullamcorper dapibus turpis. Nulla pulvinar.
Proin pulvinar enim et lorem. Quisque luctus pharetra sem. Praesent elementum arcu vel sem. Vestibulum ligula est, fermentum sed, accumsan quis, vestibulum at, diam. Vivamus in mauris a mauris egestas placerat. Donec consectetuer ante elementum elit. Phasellus enim dolor, condimentum eget, malesuada et, accumsan quis, nisl. Proin ligula. Mauris molestie, lectus a posuere gravida, tortor ipsum rhoncus magna, sit amet placerat arcu diam at eros. Donec dolor felis, imperdiet a, fermentum vitae, pharetra in, leo. Sed sollicitudin mollis augue.
 
Praesent dapibus ornare pede. Nam pellentesque, tellus eget scelerisque venenatis, nisl nisl feugiat sapien, sed tempor leo dolor ut risus. Vivamus placerat, tellus nec commodo sodales, eros libero porta enim, sit amet suscipit risus lacus nec lacus. Phasellus nisl sapien, consectetuer et, cursus quis, fringilla a, turpis. Nulla porta tellus eget metus. In interdum ultrices augue. Maecenas congue, libero ut vestibulum adipiscing, ligula nibh bibendum elit, sed porta tellus wisi vel sapien. Nulla vitae eros. Integer sodales interdum justo. Donec vehicula risus sed pede. Morbi est. Sed dui ipsum, varius et, consectetuer gravida, suscipit in, libero. Mauris consequat tellus non lorem. Nunc dignissim porttitor tortor. Cras aliquet pellentesque arcu. Donec eleifend leo sit amet nulla. Etiam a ligula.
Sweet.
 
NT backup

Went to a potential client site yesterday to do a system review. My predecessor managed to convince the company’s principal that for their server they need a BackupExec. Now, that’s a > AUD$1,000 a pop and, IMHO, a waste of company’s money for the file/print server for 7 users. I don’t want to take anything away from BackupExec – it’s a great product, faster and better than built-in NT backup, does wonders in media management and great to restore individual mailboxes (God™ knows why Exchange does not allow that). But for 7 users? Ple-e-e-e-ase! I found that for small servers (my company included), NT backup works just as well.

As far as I know, the only challenges with NT backup are scheduling and reporting. Batch file takes care of the former, great command line mailer blat - of the latter. The other “cool” features: creates media name based on backup date, automatically finds latest backup report.

<rant>
Why did Microsoft remove command-line option to specify report file in 2000 and 2003 servers? Would it kill to keep it there in the same shape and form as it was in NT 4.0?
</rant>

The batch file is below. The logic is self-explanatory but feel free to drop me a line. Naturally, server name, folders and email addresses need to be changed and before batch is used, file “Daily backup.bks” needs to be created using NT backup (contains list of things to backup – take a peek inside – it’s plain text). Once everything is in place, just schedule the batch file as required.

@echo off
setlocal

Rem get date into a vairable so we can create good media name
for /F "usebackq delims=" %%i IN (`date /t`) DO set dt="%%ibackup media"

Rem Perform backup
C:\WINNT\system32\ntbackup.exe backup "@C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\Daily backup.bks" /n %dt% /d "Daily backup set" /v:yes /r:yes /rs:no /hc:on /m normal /j "Daily backup.job" /l:s /p "4mm DDS" /um

Rem Set folder name containing backup log files
set fld=C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\

Rem This dir command will list all log files sorted by date in bare format
set fcmd=dir "%fld%*.log" /OD /A-D /B

Rem set command will set lastf variable to the last file in set, i.e. the latest one
for /F "tokens=* delims= " %%i in ('%fcmd%') do set lastf=%fld%%%i

Rem Mail latest log file to georged
c:\admin\blat.exe "%lastf%" -t georged@solutionsnet.com.au -s "Tape Backup Report" -mime -server SMTPSERVERNAME -f "backup@solutionsnet.com.au" –q

Works like a charm for me (and my clients).

Stepping on a rake

Whammm! I did it again! How many times do I have to tell myself that Response.Redirect(string) throws an ThreadAbortException?! Here is the short version:

private void Page_Load(object sender, System.EventArgs e)
{
   try
   {
      Response.Redirect("page1.aspx");
   }
   catch
   {
      Response.Redirect("page2.aspx");
   }
}

As expected(?), browser ends up on page2.aspx. So far so good but let’s do something smart and catch the exception (ignoring decoding/encoding and other mundane stuff):

private void Page_Load(object sender, System.EventArgs e)
{
   try
   {
      Response.Redirect("page1.aspx");
   }
   catch (Exception ex)
   {
      Response.Redirect("page2.aspx?error=" + ex.ToString());
   }
}

Browser ends up on page1.aspx?! Now that’s weird. Peeking in IL source with Reflector failed to reveal any substantial differences between the two. The answer, I guess, is buried somewhere inside HttpResponse.End and Thread.Abort methods which is more than my brain can digest. Explanation, anyone?

Note to myself: never place Redirect inside try{} block but if you have to, make sure it looks like this:

private void Page_Load(object sender, System.EventArgs e)
{
   try
   {
      Response.Redirect("page1.aspx", false);
      return;
   }
   catch (Exception ex)
   {
      Response.Redirect("page2.aspx?error=" + ex.ToString());
   }
}

Posted: Jun 10 2003, 01:22 AM by georged | with 6 comment(s)
Filed under:
Laptop backups

I was quite sure that Raid was not an option for a laptop but Kenneth comment with this idea about my laptop (future) backup:
I use a notebook with a wireless adapter as a "terminal" into my development server using Remote Desktop Protocol.

[heLP .Net Blog]

USB RAID is not an option? Think twice :-). But seriously, I cannot think of my development life as meaningful until I bought and installed Norton Ghost. 14GB of stuff from my laptop (and where does it come from?!) backed up to my desktop over 100MBit wire in under 40 minutes, restore took about 25 (thanks to compression, I guess). Recommended.

Next item to buy: Lacie PocketDrive. The backup should be even faster.

Word of warning: DO NOT upgrade Ghost with LiveUpdate without following it up with fresh backup. Updated application cannot restore images created with previous versions. That's right, your previous backups are useless until you reinstall Ghost. That's just plain stupid, if not criminal, IMHO.

Posted: May 29 2003, 08:02 PM by georged | with 2 comment(s)
Filed under:
I'm finally blogging (after system restore)

With the arrival of NewsGator integrated publishing and with a few people keep telling me that I should really start blogging, I guess, I have no option but to do so :-). Thanks to Scott, I now up and running.

Not to forget that I survived a very painful experience to tell about and not to mention finally finding a correct spelling for doh!.

Posted: May 29 2003, 01:17 AM by georged | with no comments
Filed under:
More Posts « Previous page