<?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>ZuhaiBlog &#187; OS X</title>
	<atom:link href="http://zuhaiblog.com/category/os-x/feed/" rel="self" type="application/rss+xml" />
	<link>http://zuhaiblog.com</link>
	<description>A blog about Zuhaib.. What you never heard of me?</description>
	<lastBuildDate>Wed, 04 Apr 2012 00:05:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using diff (or rsync) to compare folders over SSH on two different servers</title>
		<link>http://zuhaiblog.com/2011/02/14/using-diff-to-compare-folders-over-ssh-on-two-different-servers/</link>
		<comments>http://zuhaiblog.com/2011/02/14/using-diff-to-compare-folders-over-ssh-on-two-different-servers/#comments</comments>
		<pubDate>Tue, 15 Feb 2011 05:42:39 +0000</pubDate>
		<dc:creator>zuhaib</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Laughing Squid]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[Server Fault]]></category>

		<guid isPermaLink="false">http://zuhaiblog.com/?p=9384</guid>
		<description><![CDATA[So I wanted to find a quick code that will allow me to a diff over two folders as I want to be sure all files get transfered as we are using Plesk migrator to move domains from one server to another. Found a Serverfault post titled How do diff over ssh? but most of [...]]]></description>
			<content:encoded><![CDATA[<p>So I wanted to find a quick code that will allow me to a diff over two folders as I want to be sure all files get transfered as we are using Plesk migrator to move domains from one server to another.  Found a Serverfault post titled <a href="http://serverfault.com/questions/59140/how-do-diff-over-ssh">How do diff over ssh?</a> but most of the suggestions are for files and not folders and none that work recursively.  Well using <a href="http://serverfault.com/questions/59140/how-do-diff-over-ssh/59147#59147">this answer</a> from Server Fault and some man pages I have the following
<pre class="brush: bash; title: ; notranslate">
diff &lt;(ssh server1 'sudo ls -1aR /var/www/vhosts/domain.com') &lt;(ssh server2 'sudo ls -1aR /var/www/vhosts/domain.com')
</pre></p>

<p>Update:
So a lot of people in the ServerFault page I linked to mentioned rync with the &#8211;dry-run flag.  I did not look in to this much but just as I posted this blog the first @reply i got on twitter was from <a href="https://twitter.com/#!/evanhoffman/status/37387348912250880">@EvanHoffman</a> asking if I had looked at using rsync.  Ok so I thought I should revisited the problem and using rsync and I got the follow: 
<pre class="brush: bash; title: ; notranslate">
rsync --dry-run -rvce &quot;ssh -p port#&quot; user@server1:/var/www/vhosts/ /var/www/vhosts/domain.com/
</pre>
(I have not tested the rsync solution with a live box but from testing on my local system I assume this would work)
One of the limitation of this you need to be on one of the two servers vs the solutions using diff is something you do on your computer that can SSH to both systems.</p><fb:like href='http://zuhaiblog.com/2011/02/14/using-diff-to-compare-folders-over-ssh-on-two-different-servers/' send='false' layout='button_count' show_faces='true' width='450' height='65' action='like' colorscheme='light' font='lucida+grande'></fb:like><div id="tweetbutton9384" class="tw_button" style="float:left;margin-right:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fzuhaiblog.com%2F2011%2F02%2F14%2Fusing-diff-to-compare-folders-over-ssh-on-two-different-servers%2F&amp;via=zuhaib&amp;text=Using%20diff%20%28or%20rsync%29%20to%20compare%20folders%20over%20SSH%20on%20two%20different%20servers&amp;related=zuhaib&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fzuhaiblog.com%2F2011%2F02%2F14%2Fusing-diff-to-compare-folders-over-ssh-on-two-different-servers%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://zuhaiblog.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://zuhaiblog.com/2011/02/14/using-diff-to-compare-folders-over-ssh-on-two-different-servers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fitst post from my iphone</title>
		<link>http://zuhaiblog.com/2008/07/22/fitst-post-from-my-iphone/</link>
		<comments>http://zuhaiblog.com/2008/07/22/fitst-post-from-my-iphone/#comments</comments>
		<pubDate>Tue, 22 Jul 2008 22:25:35 +0000</pubDate>
		<dc:creator>zuhaib</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://zuhaiblog.com/2008/07/22/fitst-post-from-my-iphone/</guid>
		<description><![CDATA[Test from my iPhone. I am not to happy with some of ui, as well the require used of HTML to post if u want any fotmating.Tweet]]></description>
			<content:encoded><![CDATA[<p>Test from my iPhone. I am not to happy with some of ui, as well the require used of HTML to post if u want any fotmating.</p><fb:like href='http://zuhaiblog.com/2008/07/22/fitst-post-from-my-iphone/' send='false' layout='button_count' show_faces='true' width='450' height='65' action='like' colorscheme='light' font='lucida+grande'></fb:like><div id="tweetbutton18" class="tw_button" style="float:left;margin-right:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fzuhaiblog.com%2F2008%2F07%2F22%2Ffitst-post-from-my-iphone%2F&amp;via=zuhaib&amp;text=Fitst%20post%20from%20my%20iphone&amp;related=zuhaib&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fzuhaiblog.com%2F2008%2F07%2F22%2Ffitst-post-from-my-iphone%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://zuhaiblog.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://zuhaiblog.com/2008/07/22/fitst-post-from-my-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Content Delivery Network via Amazon Web Services: CloudFront: cdn.zuhaiblog.com

Served from: zuhaiblog.com @ 2012-05-19 05:27:10 -->
