<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Scott builds Software &#187; os/x</title>
	<atom:link href="http://scottpenberthy.com/tag/osx/feed/" rel="self" type="application/rss+xml" />
	<link>http://scottpenberthy.com</link>
	<description>Musings on iPhone, Flash and the Cloud</description>
	<lastBuildDate>Tue, 28 Jun 2011 05:02:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Fixing Time Machine Permission Errors</title>
		<link>http://scottpenberthy.com/2011/01/29/fixing-time-machine-permission-errors/</link>
		<comments>http://scottpenberthy.com/2011/01/29/fixing-time-machine-permission-errors/#comments</comments>
		<pubDate>Sat, 29 Jan 2011 12:21:50 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<category><![CDATA[Apps]]></category>
		<category><![CDATA[os/x]]></category>
		<category><![CDATA[time machine]]></category>

		<guid isPermaLink="false">http://scottpenberthy.com/?p=682</guid>
		<description><![CDATA[Scott explains how he fixed a broken Time Machine that refused to restore a directory on OS/X 10.6 after complaining about write permissions on the target drive.]]></description>
			<content:encoded><![CDATA[<p>This morning I inadvertently switched git repositories before committing my changes to git &#8212; several days of work were instantly wiped out.    No problem, I told myself, I&#8217;ll use Time Machine on my Mac.  I backup regularly.  I launched the Star Wars view, selected my directory, and clicked the restore button.</p>
<p>It failed.  </p>
<p>Time Machine complained about write permissions.  Nothing was restored.  My heart skipped a beat.  After Googling around for a few hours and trying all sorts of things, I finally got it to work.  The result is documented here just in case you run into the same issue.  I hope it saves you time!</p>
<h2>Fixing a busted Time Machine</h2>
<p>First, go to the very top of your directory tree where all disks are mounted.  Make sure your backup drive is attached and alive.</p>
<pre>
% cd /Volumes
</pre>
<p>Look for the volume that represents your backup drive.  cd to that:</p>
<pre>
%cd ScottBackup
%cd Backups.backupdb
</pre>
<p>Now start looking through the mount point, shown here as /Volumes/ScottBackup/Backups.backupdb.  You&#8217;ll notice that the directory tree begins with the name of your computer, followed by a set of directories, each of them named with a timestamp.  Mine look like this:</p>
<pre>
2011-01-11-003733/            2011-01-29-030503/
</pre>
<p>These are in the format of YYYY-MM-DD-time.  Pick one that you want to restore, and cd to that directory.  Here I choose a backup at 3:05am on January 29th:</p>
<pre>
% cd 2011-01-29-030503
</pre>
<p>The top level directory should look like your hard drive:</p>
<pre>
% ls
Macintosh HD/
</pre>
<p>Surf through these directories.  It should mirror your existing drive.  Under the covers, however, Mac OS/X seems to be hacking the file system.  The files don&#8217;t actually exist in multiple copies.  Instead, they&#8217;re layered into a database and made to appear as though they&#8217;re in one piece.  No matter.</p>
<p>Find the directory you want to restore.  Now comes the tricky part.</p>
<p>First, create a tarball of your disk and place it on ~/Desktop.  Let&#8217;s assume for this example that my directory is /Users/spenberthy/myapp/lostdir:</p>
<pre>
% cd Users/spenberthy/myapp
% tar cfvz ~/Desktop/lostdir.tar.gz lostdir
</pre>
<p>This will take a bit of time for a large directory.  You&#8217;ll hear your backup disk grind as OS/X reassembles all the files, reads them, and stuffs them into the tarball.</p>
<p>Now get out of there.  Move to your desktop:</p>
<pre>
% cd ~/Desktop
</pre>
<p>Decide where you want to restore the files, then move there:</p>
<pre>
% cd ~/myapp
</pre>
<p>For the first pass, unload the tarball onto your hard drive:</p>
<pre>
% tar xfvz ~/Desktop/lostdir.tar.gz
</pre>
<p>You&#8217;ll be greeted with numerous permission errors.  Ignore them.  We&#8217;re almost there.  If you list the files that you restored using &#8220;ls -l&#8221;, you&#8217;ll notice something odd:</p>
<pre>
% ls -l
total 22800
-rw-r--r--+   1 spenberthy  staff    56B Aug  5 17:17 README
drwxr-xr-x+  10 spenberthy  staff   340B Jan 29 06:46 Reachability/
drwxr-xr-x+  14 spenberthy  staff   476B Jan 29 06:46 Twitter-OAuth-iPhone/
drwxr-xr-x+   8 spenberthy  staff   272B Jan 29 06:46 certs/
</pre>
<p>See those plus signs on the left?  Well, they were new to me.  These are called <i>extended</i> permissions and use an elaborate, English-like syntax.  To see these use the command &#8220;ls -lE@&#8221;:</p>
<pre>
% ls -le@
total 22800
-rw-r--r--+   1 spenberthy  staff    56B Aug  5 17:17 README
 0: group:everyone deny write,delete,append,writeattr,writeextattr,chown
drwxr-xr-x+  10 spenberthy  staff   340B Jan 29 06:46 Reachability/
 0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown
drwxr-xr-x+  14 spenberthy  staff   476B Jan 29 06:46 Twitter-OAuth-iPhone/
 0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown
drwxr-xr-x+   8 spenberthy  staff   272B Jan 29 06:46 certs/
</pre>
<p>Those permissions are the problem.  Let&#8217;s get rid of them.</p>
<pre>
% chmod -R -a# 0 *
</pre>
<p>If you list the contents again, your extended permissions should be gone, as well as that mysterious plus sign:</p>
<pre>
% ls -l
total 22800
-rw-r--r--    1 spenberthy  staff    56B Aug  5 17:17 README
drwxr-xr-x   10 spenberthy  staff   340B Jan 29 06:46 Reachability/
drwxr-xr-x   14 spenberthy  staff   476B Jan 29 06:46 Twitter-OAuth-iPhone/
drwxr-xr-x    8 spenberthy  staff   272B Jan 29 06:46 certs/
</pre>
<p>You&#8217;re done!  In case you&#8217;re wondering, these files are for a new app I&#8217;m building with some friends and relatives at DX Agency.  More on that later.</p>
]]></content:encoded>
			<wfw:commentRss>http://scottpenberthy.com/2011/01/29/fixing-time-machine-permission-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android v. OS/X in 2010?</title>
		<link>http://scottpenberthy.com/2009/12/15/android-v-osx-in-2010/</link>
		<comments>http://scottpenberthy.com/2009/12/15/android-v-osx-in-2010/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 15:11:31 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<category><![CDATA[Apps]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[os/x]]></category>

		<guid isPermaLink="false">http://scottpenberthy.com/?p=460</guid>
		<description><![CDATA[Will Google rebrand Android as Mobile Chrome?  With Android apps reaching 20,000, Scott wonders if Google will pull together its fractured OS play.  Regardless, apps will be everywhere in 2010.]]></description>
			<content:encoded><![CDATA[<div id="attachment_461" class="wp-caption aligncenter" style="width: 320px"><img src="http://scottpenberthy.com/wp-content/uploads/2009/12/androlib-3.png" alt="There are now more than 20,000 Android Apps." title="androlib-3" width="310" class="size-full wp-image-461" /><p class="wp-caption-text">Android App growth: 20,000 strong</p></div>
<p>Maybe the real battle in 2010 will be Android vs. OS/X.  I keep wondering if Google will rebrand it as Mobile Chrome.  Regardless, I&#8217;m glad Google is finally coming out with the gPhone and letting Andy Rubin go nuts.
</p>
<p>
The growth in Android apps sure is compelling (see above, taken from Mashable).  Its all over the Web this week.  2010 is going to be an interesting year for the mobile market.  On the one hand, we&#8217;ll have an open store for the Android, much like the early days of Atari (if you built it, they&#8217;d pretty much sell it).  On the other, we have a closed iTunes store with quality control, like Nintendo.  Atari lost that battle in the 80&#8217;s as the low quality of games hurt the brand image.  Nintendo came out of the gate slower, but thrived on high quality.  Will history repeat itself?</p>
<p>Both will prosper as brands will be eager to reach their customers, directly, twenty four hours a day, on the go.  Apps will be everywhere, apps with real time information, geo location, gorgeous graphics and human-friendly interfaces with haptics and sensors galore.  I look forward to writing software for both <img src='http://scottpenberthy.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://scottpenberthy.com/2009/12/15/android-v-osx-in-2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

