Archive

Archive for the ‘System Administration’ Category

Time Machine and NAS Device setup

January 1st, 2009
Comments Off

This Christmas we (my family) decided to provide my dad an infallable backup system for his seemingly fallable PCs.  We learned that he had decided to upgrade to a Mac (a move I strongly encouraged).  So, I had to figure out how to get this NAS device to work with Time Machine over the wireless network.  I read several websites on the subject, but the backup never seemed to be able to complete.  However, I discovered an obscure reference on an apple support forum that resolved my problems.  Below I will detail how I was finally able to get Time Machine to backup to a NAS device.

  1. Prepare your NAS device and make sure you can access it
  2. Mount your NAS device as a drive
    • From Finder: APPLE + K
    • Server Address: smb://NAS-Device
    • Select which folder you want mounted.  In my case it was called “Back Up”
  3. Open up Terminal and Prepare Time Machine to use the network drive mounted above by typing:
    defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
  4. Create an empty disk image that will be used on the NAS device to contain your Time Machine backup by typing:
    hdiutil create -library SPUD -megabytes 400000 -fs HFS+J -type SPARSEBUNDLE -volname “backup” “backup.sparsebundle”

    • This creates the empty sparse bundle disk image of a size of 400 Gigabytes
    • It also creates a volume name of “backup” and the file name of “backup.sparsebundle”
  5. Move “backup.sparsebundle” to your NAS device location
  6. Open up the Console application.  I have yet to figure out a better way to do this, but we have to start a Time Machine backup and let it fail in order to name the “backup.sparsebundle” file that was moved to the NAS device properly because Time Machine is unable to requisition the name properly.  The Console application will contain the appropriate name.
  7. Open up your Time Machine Preferences
  8. Click “Change Disk” and select your the mounted drive
  9. Start a backup (it will fail)
  10. In the Console application click on “All Messages”
  11. Look for text that reads something like: /System/Library/CoreServices/backupd[8818] Creating disk image /Volumes/Backup-1/Joe User’s MacBook Pro 15″_0016cbc9be62.sparsebundle
  12. Copy this line to your favorite text editor
  13. Go into your NAS device and rename the file to “Joe User’s MacBook Pro 15″_0016cbc9be62.sparsebundle” (replacing it to your exact text…of course <grin>)
  14. Stop the backup if you haven’t already or if it hasn’t failed yet
  15. Restart the backup
  16. You should see Time Machine accepting the sparsebundle and it should properly backup

Some Caveates and cleanup items:

  1. It will take a long time for the initial backup to finish, so it’s a good idea to run this over night.
  2. The Sparsebundle name must be exactly as you find it in the console.  I’ve not found a better way yet to retrieve the drive name that it is looking for.
  3. Delete the original “backup.sparsebundle” file from your local harddrive
  4. It may be a good idea to clear the Console logs before starting the Time Machine backup the first time through, it’ll make finding the proper drive name a little easier.
  5. If you’ve gone through these steps and it’s still not working reset the Time Machine defaults: defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 0. And then go through the steps again.
  6. I chose a 400 gig sparsebundle file because the harddrive size was close to 375 gigs.

Hopefully you’ll find as much success as I have with this process.  I’ll be updating this posting soon with actual screenshots to help make it clearer.

James Hawes Mac, OS X, System Administration, Tech , ,

Failed to access IIS metabase

December 13th, 2007
Comments Off

Ok, I’m a Java developer; it’s been a long time since I’ve been inside the inner workings of IIS and .NET (where my development career started). While I am still a very dedicated Java developer, the company I am working for is integrating a third party .NET solution into our product stack. So, I’ve jumped back into the world of .NET.

I knew from the start that I had the .NET 2.x framework on my machine already, which was a plus. I also knew that I had to install IIS because the solution is web based. So that was easy enough.

I installed the solution, configured it according to the documentation, and attempted to run it through a browser. <BAM>”Failed to access IIS metabase.” error was triggered. Digging way back into the recesses of my memory, I did recall something about this (something about running a command), but again my memory is slightly outdated. Thankfully having full access to the internet provided me the solution.

c:\<path to .NET Framework version root>\aspnet_regiis -i

Give Credit where Credit is due:

http://blog.devstone.com/Aaron/archive/2006/05/08/1586.aspx

James Hawes System Administration

Cannot Delete: Path Too Long

December 13th, 2007
Comments Off

Just now I ran into a problem with an installation of a product which had very deep folder structures. I had to uninstall and delete the folders and files in order to do a fresh install. When I attempted to delete the files through Explorer and the cmd prompt I was being told that either the path was too long or the file name was too long.

Perhaps I’ve been doing development too long because I could not remember for the life of me how to get around this problem. After a few quick searches I was reminded of the the syntax “\\.\” and this solved my problem. I wanted to remove everything from the root folder of the application.

To remove folders and files:

ex. rd “\\.\c:\Path to long directory” /s /q

To removefiles

ex. del “\\.\c:\Path to file”

Give credit where credit is due:

  1. My good friend Jeremy Simmons
  2. Microsoft Support
  3. Where my memory was jogged: IT News Group.NET which is simply an alias to: microsoft.public.windows.server.general

James Hawes System Administration