21 October 2009

Time Machine does not back up everything

So as a little experiment, and a bit out of necessity, I picked up a new 320G hard drive to replace the nearly full 160G one. I decided to do a restore using only Time Machine since I still have access to the old hard drive in case anything goes wrong.

Out of the box the following does not work:

- Apache (the “Web Sharing” version)
- PHP
- mySQL
- iTunes
- VMWare Virtual Machines (I normally was not backing up the WinXP VM since there’s no data, just a couple applications)
- git

Not a massive list but considering I program, and listen to music while programming, it’s a pretty big chunk of the things I use.

Here’s the steps I followed to get things back up, more for my information than anything else!

1. Edit the host files

I had virtual servers like tel-local.com set up in the /etc/hosts file, which were not backed up. So I just recreated them, ie.

127.0.0.1 tel-local.com

2. Re-create and re-enable /etc/apache2/extra/httpd-vhosts.conf

All the virtual server configurations were gone, so I re-created them. They were just basic entries with nothing special so not a huge loss - otherwise you might want to copy them using a cron job to your Documents folder somewhere.

Then, edited the /etc/apache2/httpd.conf and re-enabled the vhosts line. A quick restart:

3. Repairing disk permissions

I ran Disk Utility, clicked on the hard drive, then ran Repair Disk Permissions. Not sure if it was required but certainly did not hurt anything.

4. Downloaded mysql dmg from mysql.com

Pretty self explanitory, but some additional work needed by following the instructions here:

# Open a terminal window and type in the following commands (without the double quotes):
# type cd /usr/local/mysql
# type sudo chown -R mysql data/, enter your Mac OS X account password when asked for it.
# To start the server, issue sudo echo first, then type sudo ./bin/mysqld_safe &
# Use it with /usr/local/mysql/bin/mysql test

You should be able to drop the /usr/local/mysql bit otherwise follow the instructions on the link above

Don’t forget to set a root password:

mysqladmin -u root password NEWPASSWORD

And also run the startup item package in the installation dmg if you want mysql to run on startup (you probably do)

5. Restore databases

Hopefully you have a mysqldump of your databases, or can get a copy from your production servers. From posts like this one you likely won’t have your databases working off the bat and restoring from a binary dump isn’t such a good idea or even possible.

I did stumble upon a post to restore your mysql database from Time Machine backups, but I did not try to do it.

6. Apache Configuration

This is also a bit outside the scope since everyone’s configuration is different, but some things I had to do was change the DocumentRoot in /etc/apache2/httpd.conf, add index.php to DirectoryIndex and add Options All and AllowOverride All in the directory block (it’s just a local dev server)

In case you run into issues, doing:

sudo apachectl restart

Did not show any errors if the configuration file is wrong. You’ll need to run console (hit the Spotlight and type console) to see the system.log.

7. Install PHP

After the apache configuration is up you’ll nicely display the full source code of your index.php for all to see. Assuming you’d rather the PHP get parsed, follow the instructions here. In short:

- Deactivate the php module in your httpd.conf if you enabled it
- Download and install the appropriate pkg file
- Run said package file

8. iTunes

For some reason the version of iTunes that I had installed before didn’t restore using Time Machine. So I had to manually grab iTunes 8.2 here. A quick google search will probably bring up other locations. You could probably upgrade to the latest version too if you wanted.

9. VMWare

Fortunately the virtual disk was backed up successfully (I had VMWare shut down just before running the Time Machine backup, don’t know if it would copy correctly while it’s still running), but VMWare was giving an error. This article pointed me in the right direction to simply re-install and voila, up and running.

I’ll add additional updates if I find other things that didn’t restore, and hope that this helps someone get their machine up and running - especially if they’re not as lucky as me to still have the old hard drive intact.

UPDATE: If you happen to have an MX 700 printer you can see instructions for re-install on the network here

8 June 2009

On the Web - Windows 7 From XP Irrelevant

There seems to be a lot of talk going around about Windows 7’s pending October (ish) release. Will programs compatible with Windows XP still work? Will people care enough to switch? Is everyone scared after Vista? Will everyone finally upgrade their PCs to support the new OS?

I tried the Windows 7 beta for about 15 minutes, and found no reason to continue. Still a Start button equivalent. Still interacting with Windows in about the same way. Still the menu equivalent hidden in obscure places like IE7 and Office 2007 running on XP.

The reason I think it’s largely irrelevant is the majority of work done in a typical office is with an Office (Word, Excel) equivalent application and most of the rest is web-based software. Sure there’s helper applications like managing tasks, appointments and e-mail, but this can be found on any OS. Along with sharing documents and printing - again, found on any typical OS. Web applications for the most part being OS independent.

If the new OS offered fundamental usability changes then perhaps it might be worth the switch. Things like the ability to scroll a window without having to click and focus first that I’ve been getting used to in Mac OSX. I didn’t notice any such changes in Windows 7, Windows has been working pretty much the same fundamental way since 3.11 for Workgroups.

Am I way off base? Can a bunch of flashy marketing really make people shell out money to get a new look to the icon that runs Internet Explorer and Firefox, or is there something about Windows 7 I’m missing? I guess we’ll see in the fall.

17 February 2009

Facebook will not replace Twitter (unless it becomes Twitter)

Well, I got a bit head of myself thinking that Facebook opening status updates in the API would spell the end of twitter.  Not that I thought the Twitter community could be dispanded by this, but perhaps a twitter clone or something resembling it could be built on top of the Facebook platform.

So I go and register fbtwitter.com, then get to work on reading the API and doing some tests using the Facebook developer page.  I promptly hit a brick wall:

  1. You can’t seem to see the status updates of others unless they’re your friend
  2. Multiple people can have the same name, so unless fbtwitter.com let’s people pick and locally store yet another username, getting someones attention with @”Brian Hogg” would go to any number of Facebook users
  3. Thanks to 1., you can’t get a public timeline of all status updates, so trying to see trends in what people are talking about right now goes out the window.

Not to mention that adding people you don’t know is a big faux pas on Facebook, while completely normal (and sometimes annoying) on Twitter.  On the plus side, you could do things like Direct Messages relatively easily.

With the tools that surround Twitter, and the openness of their API, I can’t see Facebook destroying Twitter.  Ever. Agreed?

Update: Facebook’s new design is quite Twitter-esque, but still a closed circle of updates…