<?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>Professional PHP &#187; ssh</title>
	<atom:link href="http://www.procata.com/blog/archives/tag/ssh/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.procata.com/blog</link>
	<description>PHP Programming, Web Development, PHP Advocacy and PHP Best Practices.</description>
	<lastBuildDate>Fri, 10 Dec 2010 17:23:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>rsync to remote server via ssh</title>
		<link>http://www.procata.com/blog/archives/2005/03/01/rsync-to-remote-server-via-ssh/</link>
		<comments>http://www.procata.com/blog/archives/2005/03/01/rsync-to-remote-server-via-ssh/#comments</comments>
		<pubDate>Tue, 01 Mar 2005 22:04:43 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2005/03/01/rsync-to-remote-server-via-ssh/</guid>
		<description><![CDATA[If you ever need to repeatedly upload to a remote server, here is the command line of the day:

rsync -zrptL --delete-after -e &#34;ssh&#34;  --include=core --include=tags --exclude=.DS_Store --cvs-exclude /local/dir user@host:/remote/dir/

rsync sends only the files that have changed.  I just tried rsync today for the first time and I&#8217;m impressed.  Its far faster than [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever need to repeatedly upload to a remote server, here is the command line of the day:<br />
<pre>
rsync -zrptL --delete-after -e &quot;ssh&quot;  --include=core --include=tags --exclude=.DS_Store --cvs-exclude /local/dir user@host:/remote/dir/
</pre><br />
rsync sends only the files that have changed.  I just tried rsync today for the first time and I&#8217;m impressed.  Its far faster than all of the ftp based synchronization tools I&#8217;ve used.  Unfortunately, it only goes in one direction.  Here are the meanings of the options:</p>
<p>z &#8211; use compression<br />
r &#8211; recurse directories<br />
p &#8211; preserve permissions<br />
t &#8211; preserve times<br />
L &#8211; copy (flatten) symbolic links</p>
<p>&#8211;delete-after &#8211; gets rid of any files in the remote directory that are not in the local directory.  It prevents old files from getting orphaned on the server. </p>
<p>Put any ssh parameters you need inside the quotes.</p>
<p>I develop on Mac OS X, so &#8211;exclude=.DS_Store gets rid of those annoying little files.</p>
<p>&#8211;cvs-exclude gets rid of all the crud that CVS leaves lying around.</p>
<p>&#8211;include=core and &#8211;include=tags are my very hard won lesson of today.  My program has a core and a tags directory. Tags is a special directory for cvs and removed by the &#8211;cvs-exclude option.  Any file or directory named core is also removed by this option.  &#8211;include puts em back.  The other &#8211;cvs-exclude patterns are less likely to collide.  I think &#8211;include has to come before the &#8211;cvs-exclude on the command line.</p>
<p>The trailing slash (or absence of one) on the source and destination directories matter.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2005/03/01/rsync-to-remote-server-via-ssh/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
	</channel>
</rss>

