Blogger again

I’m switching to Blogger again…  we’ll see how long it lasts.

DD-WRT Firmware for Buffalo Routers

If you’re looking for some good wireless routers Buffalo Technology officially released their DD-WRT firmware for the WHR-HP-GN and the WHR-HP-300N.

Wireless Setup

Taxonomy at Home


After reading the chapter on taxonomy governance in Microsoft Office SharePoint Server 2007 Best Practices by Ben Curry and Bill English, I started thinking about my own personal taxonomy.
Taxonomy is a division into groups or categories.1 A good example is a Library’s Dewey Decimal Classification. Tagging has become a popular means of classification in blogging and photo sharing communities. But what about the documents on my computer?

Most people keep their documents in folders. They will have a folder for each client, a folder for each class at school. Some people keep a hierarchy. An English paper is under Education -> CSUSB -> 2001 -> English -> 301. This hierarchy is how I stored my files and what also got me in trouble when I started to realize that files belonged in multiple places because it makes sense for them to be in several areas: If my brother wrote a paper on Conditional Election, should I file it under Family -> Essays -> Jon, or Religion -> Christianity -> Essays, or Religion -> Essays -> Christianity. You can see that Essays doesn’t belong under Family or Christianity and the hierarchy (in this case) is meaningless.

Metadata filesystem tagging is supposed to solve this problem.2 Instead of placing the files in folders, the theory of metadata correctly realizes that we aren’t storing hierarchical information, but descriptive data. We’re simply trying to describe the contents of a file. So I could tag the paper, “Essay, Christianity, Religion, Family. This does two things: 1) It doesn’t matter how many “tags” are given to an object (or document). The object is not duplicated. And 2) categorically searching for files is easy. This is how I’ve been organizing files the last few years.

This is a great theory, but in practice, it has failed me. First, in order for filesystem metadata to work one has to be disciplined to do it to every file. This takes time. Lots of time. Second, there are quite a few flaws in the implementation: The first I blame on Apple’s implementation because the metadata isn’t stored in the objects themselves so most backup solutions don’t back up the metadata. The second problem is tag creep. I have too many tags and I forget which ones I’ve used so I have a “money” and a “finance” tag, a “car” and an “auto” tag. If I had spent the time to develop a taxonomy this wouldn’t be an issue, but I didn’t. The thought didn’t cross my mind. Now I have a mess of inconsistent tags, half my files aren’t tagged because I don’t have time to tag them, and I’m not motivated to do so because I know when my hard drive crashes and I have to restore from backups I’ve lost all my metadata and I would have to start over.

So what do I do now? Well, now I just keep everything in the documents folder, and store any “tags” in the filename and have a workflow that pre-pends the date to the filename. I do have some high level folders that pertain more to how I got the file (or the content type) than the logical content. For example, if I scan a statement from my Schwab account it would go under the Documents -> Scan folder as “20080928 schwab statement”. I know it’s a mess but if I have to restore from backup I’ve retained the metadata in the filename.

I think tagging would be more maintainable if I developed a personal high level taxonomy (sort of a micro level taxonomy governance) instead of allowing arbitrary tag names. To see what I mean, this is how I’ve been classifying files (low level): Christianity, Automobile, Schwab, Lisp, Car, Essay, Recipe. But this is how I should classify files (high level): I would create a list of (no more than 10) high level tags like, “Religion, Transportation, Finance, Knowledge” that would have enough foresight to cover all topics and areas in the future (much like Dewey).
But who has time to do that?

I don’t. So my files are a mess, and they will stay that way. But the important thing is I know how they should be organized.

Notes

1 http://www.answers.com/taxonomy, Referenced September 29, 2008

How to Backup SQL Server 2005 Databases

Backup Requirement

Daily full backup, transaction log backups every 15 minutes. Files are backed up to the local filesystem. Remote backup server copies changes from the server every 15 minutes. Although not an efficient use of space, it is useful to backup to the local hard drive in case a point in time restore is needed, or for restoring tests databases to other SQL Server instances.

Recoverability

If an unrecoverable failure occured on the database system the data will be recoverable to a state within 30 minutes (this is a worst case scenario if the remote backups aren’t synchronized: 15 since last transaction log and 15 minutes since last offsite backup) of failure by restoring the full backup and rolling the transaction log backups forward.

SQL Server backups

Create a Job to do a FULL backup daily. Overwrite the backup if it already exists, and it’s always a good idea to do a checksum and verify the backup:

BACKUP DATABASE [WSS_Content] TO DISK = N’D:\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\WSS_Content.bak’ WITH NOFORMAT, INIT, NAME = N’WSS_Content-Full Database Backup’, SKIP, NOREWIND, NOUNLOAD, STATS = 10, CHECKSUM
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N’WSS_Content’ and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N’WSS_Content’ )
if @backupSetId is null begin raiserror(N’Verify failed. Backup information for database ”WSS_Content” not found.’, 16, 1) end
RESTORE VERIFYONLY FROM DISK = N’D:\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\WSS_Content.bak’ WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO

Create a second Job to do a Transaction Log backup every 15 minutes. This time append to the backup file like this:

BACKUP LOG [WSS_Content] TO DISK = N’D:\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\WSS_Content.trn’ WITH NOFORMAT, NOINIT, NAME = N’WSS_Content-Transaction Log Backup’, SKIP, NOREWIND, NOUNLOAD, STATS = 10, CHECKSUM
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N’WSS_Content’ and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N’WSS_Content’ )
if @backupSetId is null begin raiserror(N’Verify failed. Backup information for database ”WSS_Content” not found.’, 16, 1) end
RESTORE VERIFYONLY FROM DISK = N’D:\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\WSS_Content.trn’ WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO

To prevent the transaction log backup file from growing infinitly large add a second step to the first Job, so that after the FULL backup an immediate transaction log backup occurs. The only difference is you want to overwite the backup set for the transaction log:

BACKUP LOG [WSS_Content] TO DISK = N’D:\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\WSS_Content.trn’ WITH NOFORMAT, INIT, NAME = N’WSS_Content-Transaction Log Backup’, SKIP, NOREWIND, NOUNLOAD, STATS = 10, CHECKSUM
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N’WSS_Content’ and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N’WSS_Content’ )
if @backupSetId is null begin raiserror(N’Verify failed. Backup information for database ”WSS_Content” not found.’, 16, 1) end
RESTORE VERIFYONLY FROM DISK = N’D:\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\WSS_Content.trn’ WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO

Summary

The first Job runs daily and has two steps. The first step does a full backup of the database overwriting the previous full backup. The second step does a transaction log backup overwriting all the previous transaction log backups. The second job runs a transaction log backup, which gets appended to the previous transaction log backup every 15 minutes. While this is happening the backup server checks every 15 minutes archiving any new or changed files from the system.

Restoring

To restore the database, first restore the full backup, then restore each transaction log. Here’s an example of restoring the first four transaction logs:

RESTORE DATABASE [WSS_Content] FILE = N’WSS_Content’ FROM DISK = N’D:\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\WSS_Content.bak’ WITH FILE = 1, NORECOVERY, NOUNLOAD, STATS = 10
GO
RESTORE LOG [WSS_Content] FROM DISK = N’D:\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\WSS_Content.trn’ WITH FILE = 1, NORECOVERY, NOUNLOAD, STATS = 10
GO
RESTORE LOG [WSS_Content] FROM DISK = N’D:\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\WSS_Content.trn’ WITH FILE = 2, NORECOVERY, NOUNLOAD, STATS = 10
GO
RESTORE LOG [WSS_Content] FROM DISK = N’D:\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\WSS_Content.trn’ WITH FILE = 3, NORECOVERY, NOUNLOAD, STATS = 10
GO
RESTORE LOG [WSS_Content] FROM DISK = N’D:\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\WSS_Content.trn’ WITH FILE = 4, NOUNLOAD, STATS = 10
GO

Make sure the last log restore puts the database into RECOVERY mode by omitting the NORECOVERY command. The database can only have transaction logs rolled forward while in NORECOVERY mode. If you mess this up by putting the database into RECOVERY mode before the last transaction log is rolled forward, you have to start the restore process all over. So do not mess it up.

Push email.

What’s the big deal about push email?

RIM’s Blackberry and BES server, Apple’s iPhone and MobileMe service, Microsoft’s ActiveSync with Exchange all offer Push Email. That is, your phone instantly gets a notifcation of new email. I don’t get it. I don’t want my phone to tell me when I have new email. I disable push email and set it to check once an hour at most and when I feel like it I’ll read them to see if there’s anything urgent. I get tons of personal and work email throughout the day and barely have time to read them much less get interrupted every time one comes in. Sometimes I even exit Outlook while I’m at work if I need to get something done. I think most people don’t realize how much time checking email costs.

If anything I would like a phone that notifies me when I don’t get new email, because that probably means something is wrong with the mail server.