<?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>LinuxPlanet Blogs</title>
	<atom:link href="http://www.linuxplanet.org/blogs/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.linuxplanet.org/blogs</link>
	<description>By Linux Geeks, For Linux Geeks.</description>
	<lastBuildDate>Thu, 23 May 2013 15:07:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Packing and Unpacking files with GNU Tar</title>
		<link>http://feedproxy.google.com/~r/bencane/SAUo/~3/-mF4CBLoQe8/</link>
		<comments>http://feedproxy.google.com/~r/bencane/SAUo/~3/-mF4CBLoQe8/#comments</comments>
		<pubDate>Thu, 23 May 2013 15:07:37 +0000</pubDate>
		<dc:creator>Benjamin Cane</dc:creator>
				<category><![CDATA[all]]></category>
		<category><![CDATA[All Articles]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[extracting a tar file]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Commands]]></category>
		<category><![CDATA[SysAdmin Basics]]></category>
		<category><![CDATA[tar command]]></category>
		<category><![CDATA[tarcopy]]></category>
		<category><![CDATA[tarpipe]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[Unix Commands]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://bencane.com/?p=12245108240</guid>
		<description><![CDATA[One of the most basic tasks for any Sysadmin is packing and unpacking files for various reasons. While there are many ways to perform this task GNU Tar is probably one of the most recognized and commonly used tools by Linux/Unix users. A little history on tar The tar command is a command that appeared<a href="http://bencane.com/2013/05/packing-and-unpacking-files-with-gnu-tar/">&#160;&#160;Full Article&#8230;</a>
]]></description>
				<content:encoded><![CDATA[<p>One of the most basic tasks for any Sysadmin is packing and unpacking files for various reasons. While there are many ways to perform this task GNU Tar is probably one of the most recognized and commonly used tools by Linux/Unix users.</p>
<h2 id="section-1">A little history on tar</h2>
<p>The tar command is a command that appeared in the early days of Unix and has had several changes made over time. Originally the command was used to take files, combine them into one file and write them to a <strong>t</strong>ape <strong>ar</strong>chive (tar). Nowadays tar is used mostly as a general purpose tool to package and compress many files into one single file for distribution or backup.</p>
<p>There are several common implementations of tar that are in use today, because there are multiple implementations there are also some differences in the options and formats available. In today&#8217;s article I will not be showing all of the various options of tar (that&#8217;s what man pages are for), but rather will be showing commonly used flags and some not so common tricks.</p>
<div class="woo-sc-hr"></div>
<h2 id="section-2">Tar Basics</h2>
<h4 id="section-3">Creating a tar file</h4>
<p>To create a basic tar you really only need to specify a few things.</p>
<ul>
<li>-c Stands for create, you will see this a lot in our examples today</li>
<li>-f or &#8211;file immediately followed by a file or device will tell tar where to create the tar file</li>
<li>And finally the files or directories to package</li>
</ul>
<pre>$ tar -cf tarfile.tar file1.txt</pre>
<h4 id="section-4"> Extracting a tar file</h4>
<p>Extracting a tar file is just as simple as creating one.</p>
<ul>
<li>-x Stands for extract</li>
<li>-f or &#8211;file immediately followed by a file or device has the same usage as create</li>
</ul>
<pre>$ tar -xf tarfile.tar</pre>
<h4 id="section-5">Adding verbosity</h4>
<p>By default tar does not output what it is doing, you can add this by adding verbosity to the command with the -v flag. In addition to adding verbosity we are also going to tar more than one file in our example. Packaging more than one file is the point of tar after all isn&#8217;t it?</p>
<pre>$ tar -cvf tarfile.tar files_dir/ file1.txt
files_dir/
files_dir/file3.txt
files_dir/file4.txt
file1.txt</pre>
<p>As you can see packaging an entire directory is as simple as adding it to the list of files to package into a tar file.</p>
<h4 id="section-6">Listing files in an existing tar</h4>
<p>Sometimes you simply want to look at the files within a tar file without extracting, to do so we can use the -t or &#8211;list flag. As a side note it is generally a good practice when you receive a tar file from an outside source to list the contents of the tarball to ensure you are not overwriting files you do not intend to.</p>
<pre>$ tar -tf tarfile.tar
files_dir/
files_dir/file3.txt
files_dir/file4.txt
file1.txt</pre>
<p>We can also add the verbose option and show the files attributes such as permissions, size and timestamps.</p>
<pre>$ tar -tvf tarfile.tar
drwxrwxr-x madflojo/madflojo 0 2013-05-22 21:00 files_dir/
-rw-rw-r-- madflojo/madflojo 0 2013-05-22 21:00 files_dir/file3.txt
-rw-rw-r-- madflojo/madflojo 0 2013-05-22 21:00 files_dir/file4.txt
-rw-rw-r-- madflojo/madflojo 0 2013-05-22 20:42 file1.txt</pre>
<p>An important note on tar is that it has the ability of retaining file attributes such as permissions, size and timestamps. When extracted as a user with proper privileges these attributes will be applied to the newly created files or overwritten files.</p>
<h4 id="section-7">Appending files to an existing tar</h4>
<p>Once a tar file is created it is possible to add files with the -r or &#8211;append option. The append option however is not allowed when the file had been compressed.</p>
<pre>$ tar -rvf tarfile.tar file2.txt
 file2.txt</pre>
<h4 id="section-8">Adding gzip compression</h4>
<p>Early versions of tar used Unix compress for file compression, after some time gzip compression was also added.</p>
<h5 id="section-9">The old way</h5>
<p>Some systems had implemented the gzip command but not a tar command that added gzip inherently. Originally if users wanted to create a tarball that was gzip compressed they would need to tar the file and then gzip it.</p>
<pre>$ tar -cvf tarfile.tar file1.txt file2.txt
file1.txt
file2.txt
$ gzip tarfile.tar
$ ls -la tarfile.tar.gz
-rw-rw-r-- 1 madflojo madflojo 136 May 22 21:22 tarfile.tar.gz</pre>
<h5 id="section-10">The new way</h5>
<p>Modern implementations of tar add gzip compression inherently; you can add this compression at the creation of the tar file with the -z or &#8211;gzip option.</p>
<pre>$ tar -cvzf tarfile.tar.gz file1.txt file2.txt
file1.txt
file2.txt</pre>
<h4 id="section-11"> Adding bzip2 compression</h4>
<p>bzip2 is a compression tool much like gzip however it uses a different algorithm to compress files and is generally better at compression however it takes longer to compress items. To add bzip2 compression we simply add a -j to the command.</p>
<pre>$ tar -cjvf tarfile.tar.bz files_dir
files_dir/
files_dir/file3.txt
files_dir/file4.txt</pre>
<h4 id="section-12">Extracting tarballs with compression</h4>
<p>Any-time you are dealing with tarfiles that have been compressed you will need to add the appropriate compression flag to other tar commands such as extract or list. The following is an example of extracting a bzip2 file.</p>
<pre>$ tar -xjvf tarfile.tar.bz files_dir
files_dir/
files_dir/file3.txt
files_dir/file4.txt</pre>
<h4 id="section-13">Listing tarballs with compression</h4>
<p>The following is an example of listing a tar files contents that has gzip compression.</p>
<pre>$ tar -cjvf tarfile.tar.bz files_dir
files_dir/
files_dir/file3.txt
files_dir/file4.txt</pre>
<h4 id="section-14">Extract without replacing old files</h4>
<p>The tar commands on today&#8217;s systems have the ability to extract files without overwriting and existing file. To enable this you will need to specify -k on the extract command.</p>
<pre>$ tar -czf tarfile.tar.gz file1.txt file2.txt
$ rm file2.txt &amp;&amp; echo "I removed file2" &gt;&gt; file1.txt
$ tar -xvzkf tarfile.tar.gz
file1.txt
file2.txt
$ cat file1.txt
I removed file2</pre>
<h2 id="section-15">Beyond the basic tar commands</h2>
<h4 id="section-16">Creating a tar with &#8211;files-from  to avoid argument list too long</h4>
<p>Sometimes specifying the files for tar to package is difficult. Either due to the number of files, the names of files or simply because it is too much to type. Tar has the ability to read a file and create a tarball of the files listed within the input file.</p>
<p>Below is an example of one way to get around the <a title="Argument list too long" href="http://bencane.com/2011/07/argument-list-too-long/">argument list too long</a> problem.</p>
<p><strong> The problem:</strong></p>
<pre>$ tar -czf ../tarfile.tgz *
bash: /bin/tar: Argument list too long</pre>
<p><strong>Solution:</strong></p>
<pre>$ ls &gt; ../filestocopy.txt
$ tar -T ../filestocopy.txt -czf ../tarfile.tgz</pre>
<p>In addition to the argument list too long scenario the -T flag can be useful for automated jobs that may need to run tar against many files.</p>
<h4 id="section-17">Tarpipe (or TarCopy)</h4>
<p>Tarpipe or sometimes refereed to as tarcopy is the process where one would use tar to copy files from one place to another.</p>
<p>The idea behind tarpipe is that tar has the ability to send the packaged files to stdout rather than to a file. When you use this you can pipe that stdout to another tar command in a different directory.</p>
<pre>$ tar -cf - file* | (cd ../files_copied/ &amp;&amp; tar -xf -)</pre>
<p>The &#8211; after -f where a file name would normally go is what tells tar to send the output to standard out.</p>
<h5 id="section-18">Why use tar and not cp?</h5>
<p>Originally the cp command did not support preserving timestamps and file permissions and that was one of the major reasons to use tarpipe rather than cp. However times have changed and modern-day cp commands do have the -p (preserve) option, but there is still one reason to use tarpipe over cp. It&#8217;s Faster!</p>
<pre>$ time tar -cf - file* | (cd ../files_copied/ &amp;&amp; tar -xf -)

real    0m0.010s
user    0m0.004s
sys    0m0.004s</pre>
<pre>$ time cp -p file* ../files_copied/

real    0m0.024s
user    0m0.000s
sys    0m0.000s</pre>
<p>While .006s does not seem like a long time the above command only copied 2 files. If these files are large in size or if we start talking about millions of files, that .006s starts adding up.</p>
<h4 id="section-19">Using tarpipe to copy files to a remote system</h4>
<p>Sometimes you may need to copy files from one system to another retaining permissions and timestamps. Luckily tarpipe isn&#8217;t only limited to local system copies, you can also use it to copy to remote systems through SSH. While on most modern systems its probably better/faster to use rsync, if you are supporting an older OS that doesn&#8217;t have rsync this could save you sometime.</p>
<pre>$ tar -cf - file* | ssh remote-server "(cd /files_copied/ &amp;&amp; tar -xf -)"</pre>
<p>&nbsp;</p>

	Tags: <a href="http://bencane.com/tags/all/" title="all" rel="tag">all</a>, <a href="http://bencane.com/tags/extracting-a-tar-file/" title="extracting a tar file" rel="tag">extracting a tar file</a>, <a href="http://bencane.com/tags/linux/" title="linux" rel="tag">linux</a>, <a href="http://bencane.com/tags/tar-command/" title="tar command" rel="tag">tar command</a>, <a href="http://bencane.com/tags/tarcopy/" title="tarcopy" rel="tag">tarcopy</a>, <a href="http://bencane.com/tags/tarpipe/" title="tarpipe" rel="tag">tarpipe</a><br />
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/bencane/SAUo?a=-mF4CBLoQe8:F8sDBhx6LNI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/bencane/SAUo?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bencane/SAUo?a=-mF4CBLoQe8:F8sDBhx6LNI:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/bencane/SAUo?i=-mF4CBLoQe8:F8sDBhx6LNI:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bencane/SAUo?a=-mF4CBLoQe8:F8sDBhx6LNI:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/bencane/SAUo?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bencane/SAUo?a=-mF4CBLoQe8:F8sDBhx6LNI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/bencane/SAUo?i=-mF4CBLoQe8:F8sDBhx6LNI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bencane/SAUo?a=-mF4CBLoQe8:F8sDBhx6LNI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/bencane/SAUo?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bencane/SAUo?a=-mF4CBLoQe8:F8sDBhx6LNI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/bencane/SAUo?i=-mF4CBLoQe8:F8sDBhx6LNI:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/bencane/SAUo/~4/-mF4CBLoQe8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://bencane.com/2013/05/packing-and-unpacking-files-with-gnu-tar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
		<item>
		<title>How does a process deal with user credentials?</title>
		<link>http://feedproxy.google.com/~r/lamolabs/~3/cN8c-Ff9OAQ/</link>
		<comments>http://feedproxy.google.com/~r/lamolabs/~3/cN8c-Ff9OAQ/#comments</comments>
		<pubDate>Wed, 22 May 2013 00:17:51 +0000</pubDate>
		<dc:creator>slmingol</dc:creator>
				<category><![CDATA[credentials]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[permissions]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.lamolabs.org/blog/?p=10715</guid>
		<description><![CDATA[Background

<p>A question came up on the Stack Exchange site Unix &#38; Linux in which I wrote up a pretty good answer, that describes some of the mechanics of how a process deals with its user credentials, so I&#8217;m adding my writeup to the blog.</p>

<p>It really comes down to what makes up a process in Unix. [...]</p>
<div> </div>
]]></description>
				<content:encoded><![CDATA[<h3>Background</h3>

<p>A <a href="http://unix.stackexchange.com/questions/76634/what-is-a-process-gid-and-what-purpose-does-it-serve/76649#76649">question</a> came up on the <a href="http://unix.stackexchange.com/">Stack Exchange site Unix &amp; Linux</a> in which I wrote up a pretty good answer, that describes some of the mechanics of how a process deals with its user credentials, so I&#8217;m adding my writeup to the blog.</p>

<p>It really comes down to what makes up a process in Unix. A process can come into existence in one of 2 ways. Either via the <code>fork()</code> function or through one of the <code>exec()</code> functions in C. </p>

<h5 class="line"><code>fork()</code></h5>

<p><code>fork()</code> basically just makes a copy of the current process, but assigns it a new process ID (PID). It&#8217;s a child of the original process. You can see this relationship in the output of @ps@:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p107156"><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code" id="p10715code6"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">ps</span> axjf
 PPID   PID  PGID   SID TTY      TPGID STAT   UID   TIME COMMAND
    1  5255  1964  1964 ?           <span style="color: #660033;">-1</span> Sl     500   0:39 gnome-terminal
 5255  5259  1964  1964 ?           <span style="color: #660033;">-1</span> S      500   0:00  \_ gnome-pty-helper
 5255 18422 18422 18422 pts<span style="color: #000000; font-weight: bold;">/</span>1    18422 Ss+    500   0:01  \_ <span style="color: #c20cb9; font-weight: bold;">bash</span>
 5255 30473 30473 30473 pts<span style="color: #000000; font-weight: bold;">/</span>4    30473 Ss+    500   0:00  \_ <span style="color: #c20cb9; font-weight: bold;">bash</span>
30473   782   782 30473 pts<span style="color: #000000; font-weight: bold;">/</span>4    30473 Sl     500   1:14  <span style="color: #000000; font-weight: bold;">|</span>   \_ evince s.pdf</pre></td></tr></table></div>




<p>Here you can see that <code>gnome-terminal</code> is the parent process (PID = 5255) and that <code>bash</code> is it&#8217;s child (PID = 18422, <span class="caps">PPID </span>= 5255). </p>

<p>When a process forks from its parent, it &#8220;inherits&#8221; certain things, such as copies of all the file descriptors that the parent currently has for open files and the parent&#8217;s user and group IDs. </p>

<p><b style="color:red">NOTE1:</b> <em style="color:gray">PPID = Parent Process <span class="caps">ID.</span></em><br />
<b style="color:red">NOTE2:</b> <em style="color:gray">The last 2 are what identify what file and group permissions this process will have when accessing the file system.</em></p>

<p>So if a process just inherits its user and group ID from its parent, then why isn&#8217;t everything just owned by root or a single user? This is where <code>exec()</code> comes in.</p>

<h5 class="line"><code>exec()</code> Part #1</h5>

<p><span id="more-10715"></span></p>

<p>The <code>exec()</code> family of functions, specifically <code>execve()</code>, &#8220;replace&#8221; a current process image with a new process image. The terminology &#8220;process image&#8221; is really just a file, i.e. an executable on disk. So this is how a bash script can execute a program such as <code>/usr/bin/time</code>. </p>

<p>So what about the user ID and group ID? Well to understand that let&#8217;s first discuss the concept of &#8220;Persona&#8221;.</p>

<h5 class="line">Persona</h5>

<p>At any time, each process has an effective user <span class="caps">ID, </span>an effective group <span class="caps">ID, </span>and a set of supplementary group IDs. These IDs determine the privileges of the process. They are collectively called the [persona of the process]<sup class="footnote"><a href="http://feedproxy.google.com/~r/lamolabs/~3/cN8c-Ff9OAQ/#fn1">1</a></sup>, because they determine &#8220;who it is&#8221; for purposes of access control.</p>

<h5 class="line"><code>exec()</code> Part #2</h5>

<p>So in addition to being able to swap out the &#8220;process image&#8221;, <code>exec()</code> can also change the user &amp; group IDs from the original &#8220;real&#8221; ones to &#8220;effective&#8221; ones.</p>

<h5 class="line">An example</h5>

<p>For this demonstration I&#8217;m going to show you what happens when we start out in a shell as our default <span class="caps">UID</span>/GID, and then spawn a child shell using one of my supplementary <span class="caps">GID</span>s, making it the child shell&#8217;s effective <span class="caps">GID.</span></p>

<p>To perform this I&#8217;m going to make use of the unix command <code>newgrp</code>. <code>newgrp</code> allows you to spawn a new shell passing it the supplementary group that I&#8217;d like to make my effective <span class="caps">GID.</span></p>

<p>For starters:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p107157"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p10715code7"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">id</span> <span style="color: #660033;">-a</span>
<span style="color: #007800;">uid</span>=500<span style="color: #7a0874; font-weight: bold;">&#40;</span>saml<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #007800;">gid</span>=501<span style="color: #7a0874; font-weight: bold;">&#40;</span>saml<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #c20cb9; font-weight: bold;">groups</span>=<span style="color: #000000;">501</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>saml<span style="color: #7a0874; font-weight: bold;">&#41;</span>,<span style="color: #000000;">502</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>vboxusers<span style="color: #7a0874; font-weight: bold;">&#41;</span>,<span style="color: #000000;">503</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>jupiter<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></td></tr></table></div>




<p>We can see that this shell is currently configured with my default <span class="caps">UID</span>/GID of <code>saml</code> &amp; <code>saml</code>. Touching some files shows that this is the case as well:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p107158"><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code" id="p10715code8"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">touch</span> afile1
$ <span style="color: #c20cb9; font-weight: bold;">touch</span> afile2
$ <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-l</span>
total 0
<span style="color: #660033;">-rw-rw-r--</span> 1 saml saml 0 May 21 23:47 afile1
<span style="color: #660033;">-rw-rw-r--</span> <span style="color: #000000;">1</span> saml saml <span style="color: #000000;">0</span> May <span style="color: #000000;">21</span> <span style="color: #000000;">23</span>:<span style="color: #000000;">47</span> afile2</pre></td></tr></table></div>




<p>Now we make our supplementary group <code>jupiter</code> the effective <span class="caps">GID</span>:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p107159"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p10715code9"><pre class="bash" style="font-family:monospace;">$ newgrp jupiter
$ <span style="color: #c20cb9; font-weight: bold;">id</span> <span style="color: #660033;">-a</span>
<span style="color: #007800;">uid</span>=500<span style="color: #7a0874; font-weight: bold;">&#40;</span>saml<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #007800;">gid</span>=503<span style="color: #7a0874; font-weight: bold;">&#40;</span>jupiter<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #c20cb9; font-weight: bold;">groups</span>=<span style="color: #000000;">501</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>saml<span style="color: #7a0874; font-weight: bold;">&#41;</span>,<span style="color: #000000;">502</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>vboxusers<span style="color: #7a0874; font-weight: bold;">&#41;</span>,<span style="color: #000000;">503</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>jupiter<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></td></tr></table></div>




<p>Now if we touch some files:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p1071510"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code" id="p10715code10"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">touch</span> afile3
$ <span style="color: #c20cb9; font-weight: bold;">touch</span> afile4
$ <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-l</span>
total 0
<span style="color: #660033;">-rw-rw-r--</span> 1 saml saml    0 May 21 23:47 afile1
<span style="color: #660033;">-rw-rw-r--</span> 1 saml saml    0 May 21 23:47 afile2
<span style="color: #660033;">-rw-r--r--</span> 1 saml jupiter 0 May 21 23:49 afile3
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> saml jupiter <span style="color: #000000;">0</span> May <span style="color: #000000;">21</span> <span style="color: #000000;">23</span>:<span style="color: #000000;">49</span> afile4</pre></td></tr></table></div>




<p>We see that the shell&#8217;s effective <span class="caps">GID </span>is <code>jupiter</code>, so any interactions with the disk result in files being created with <code>jupiter</code> rather than my normal default group of <code>saml</code>.</p>

<h5 class="line">References</h5>


<ul>
<li><a href="http://linux.die.net/man/2/fork">fork() man page</a></li>
<li><a href="http://linux.die.net/man/3/exec">exec() man page</a></li>
<li><a href="http://linux.die.net/man/2/execve">execve() man page</a></li>
<li><a href="http://linux.die.net/man/7/credentials">credentials man page</a></li>
<li><a href="http://linux.die.net/man/1/newgrp">newgrp man page</a></li>
<li><a href="http://www.delorie.com/gnu/docs/glibc/libc.html">The <span class="caps">GNU</span> C Library</a></li>
<li><a href="http://www.delorie.com/gnu/docs/glibc/libc_567.html">The <span class="caps">GNU</span> C Library &#8211; 26.4 Creating a Process</a></li>
<li><a href="http://www.delorie.com/gnu/docs/glibc/libc_568.html">The <span class="caps">GNU</span> C Library &#8211; 26.5 Executing a File</a></li>
<li><a href="http://unix.stackexchange.com/questions/18198/gid-current-primary-supplementary-effective-and-real-group-ids"><span class="caps">GID, </span>current, primary, supplementary, effective and real group IDs?</a></li>
</ul>

<div class="wherego_related"> </div><img src="http://feeds.feedburner.com/~r/lamolabs/~4/cN8c-Ff9OAQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.lamolabs.org/blog/10715/how-does-a-process-deal-with-user-credentials/feed/atom/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
		<item>
		<title>Download Mageia 3 Final Release / CD / DVD / ISO / Linux / 32-Bit / 64-Bit</title>
		<link>http://www.tejasbarot.com/2013/05/21/download-mageia-3-final-release-cd-dvd-linux-32-bit-64-bit/</link>
		<comments>http://www.tejasbarot.com/2013/05/21/download-mageia-3-final-release-cd-dvd-linux-32-bit-64-bit/#comments</comments>
		<pubDate>Tue, 21 May 2013 04:30:07 +0000</pubDate>
		<dc:creator>Tejas Barot</dc:creator>
				<category><![CDATA[Download Mageia]]></category>
		<category><![CDATA[Download Mageia 3]]></category>
		<category><![CDATA[i686]]></category>
		<category><![CDATA[ISO Downloads]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux distribution]]></category>
		<category><![CDATA[Mageia]]></category>
		<category><![CDATA[Mageia 3]]></category>
		<category><![CDATA[Mageia 32-Bit ( i386]]></category>
		<category><![CDATA[Mageia CD]]></category>
		<category><![CDATA[Mageia DVD]]></category>
		<category><![CDATA[Magiea X86_64 ( 64-Bit )]]></category>
		<category><![CDATA[new features]]></category>
		<category><![CDATA[New Linux Distribution]]></category>
		<category><![CDATA[New Releases]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[RPM Based Distribution]]></category>

		<guid isPermaLink="false">http://www.tejasbarot.com/?p=2624</guid>
		<description><![CDATA[Dear All, Very Happy to share a Links of One Another Distribution in Linux and It is Mageia Linux. Mageia is RPM Based Distribution. At Last I have Mentioned a Link to Download Mageia 3 Linux for 32-Bit ( i386,i686 ) and X86_64 ( 64-Bit ) Architecture....]]></description>
				<content:encoded><![CDATA[Dear All, Very Happy to share a Links of One Another Distribution in Linux and It is Mageia Linux. Mageia is RPM Based Distribution. At Last I have Mentioned a Link to Download Mageia 3 Linux for 32-Bit ( i386,i686 ) and X86_64 ( 64-Bit ) Architecture. Major Features in Mageia 3 :- Updates to [...]]]></content:encoded>
			<wfw:commentRss>http://www.tejasbarot.com/2013/05/21/download-mageia-3-final-release-cd-dvd-linux-32-bit-64-bit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
		<item>
		<title>Securely backing up your files with rdiff-backup and sudo</title>
		<link>http://feedproxy.google.com/~r/bencane/SAUo/~3/-6eVmKIEO2k/</link>
		<comments>http://feedproxy.google.com/~r/bencane/SAUo/~3/-6eVmKIEO2k/#comments</comments>
		<pubDate>Mon, 20 May 2013 16:10:30 +0000</pubDate>
		<dc:creator>Benjamin Cane</dc:creator>
				<category><![CDATA[administration]]></category>
		<category><![CDATA[All Articles]]></category>
		<category><![CDATA[backup package]]></category>
		<category><![CDATA[backup server]]></category>
		<category><![CDATA[backup tool]]></category>
		<category><![CDATA[How To & Tutorials]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Commands]]></category>
		<category><![CDATA[rdiff-backup]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://bencane.com/?p=12245108242</guid>
		<description><![CDATA[Backups are important, whether you are backing up your databases or your wedding pictures. The loss of data can ruin your day. While there is a huge list of backup software to choose from; some good, some not so good. One of the tools that I have used for years is rdiff-backup. rdiff-backup is a<a href="http://bencane.com/2013/05/securely-backing-up-your-files-with-rdiff-backup-and-sudo/">&#160;&#160;Full Article&#8230;</a>
]]></description>
				<content:encoded><![CDATA[<p>Backups are important, whether you are backing up your databases or your wedding pictures. The loss of data can ruin your day. While there is a huge <a href="http://en.wikipedia.org/wiki/List_of_backup_software" >list of backup software</a> to choose from; some good, some not so good. One of the tools that I have used for years is rdiff-backup.</p>
<p>rdiff-backup is a rsync delta based backup tool that both stores a full mirror and incremental changes. It determines changes based on the rsync method of creating small delta files, which allows for rdiff-backup to restore files to any point in time (within the specified retention period).</p>
<p>In the examples below I will refer to two servers names, <strong>backup-server</strong> and <strong>server</strong>. The names are pretty self-explanatory but just in case, <strong>backup-server</strong> is the location where I permanently store files copied (backed up) from <strong>server</strong>.</p>
<div class="woo-sc-hr"></div>
<h2 id="section-1">Setting up rdiff-backup</h2>
<p>Installing rdiff-backup is easy considering most Linux distributions include it into their default repositories. In this article I will be using Ubuntu for my example systems.</p>
<p><strong>Note:</strong> For Red Hat you will need to enable the EPEL repository to install rdiff-backup via YUM.</p>
<h4 id="section-2">Installing</h4>
<p>In order for rdiff-backup to work both the source and destination will require the rdiff-backup package. You can install it via apt-get.</p>
<p><strong>On backup-server</strong>:</p>
<pre>root@backup-server# apt-get install rdiff-backup</pre>
<p><strong>On server</strong>:</p>
<pre>root@server# apt-get install rdiff-backup</pre>
<h4 id="section-3">Validate rdiff-backup versions match</h4>
<p>One of the quirky things about rdiff-backup is that the tool does not support backwards capability with older versions. For this reason it is best to make sure that your rdiff-backup versions are the same on both servers.</p>
<p><strong>On backup-server:</strong></p>
<pre>root@backup-server# rdiff-backup --version
rdiff-backup 1.2.8</pre>
<p><strong>On server:</strong></p>
<pre>root@server# rdiff-backup --version
rdiff-backup 1.2.8</pre>
<h4 id="section-4">Setting up SSH Keys</h4>
<p>By default rdiff-backup uses SSH to communicate with remote systems to avoid typing a password every time rdiff-backup runs we will need to set-up SSH keys with passphrase-less authentication.</p>
<p><strong>On backup-server:</strong></p>
<pre>root@backup-server# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.</pre>
<p>When asked leave the passphrase empty.</p>
<p>Once you have the SSH key generated you will need to copy the contents of /root/.ssh/id_rsa.pub to the remote servers for key-based authentication. For our configuration we will use a non-privileged user account (test), as this will let us implement rdiff-backup without giving the backup-server full access to the systems being backed up.</p>
<p><strong>On backup-server:</strong></p>
<pre>root@backup-server:# scp /root/.ssh/id_rsa.pub test@server:/var/tmp/id_rsa.pub.temp</pre>
<p><strong>On server:</strong></p>
<pre>test@server:$ cat /var/tmp/id_rsa.pub.temp &gt;&gt; ~/.ssh/authorized_keys</pre>
<p>You should now be able to SSH from <strong>backup-server</strong> to <strong>server</strong> without being asked for a password.</p>
<h2 id="section-5">Running backup jobs</h2>
<p>Now that <strong>backup-server</strong> is able to SSH to <strong>server</strong> without being asked a password and rdiff-backup is the same version on both systems we are able to perform the first backup.</p>
<p>The directory we will backup today is <strong>/var/tmp/backmeup</strong> and we will be backing it up to <strong>/var/tmp/backups/server.example.com/</strong>. I personally prefer to backup to a directory named after the originating server, that way there is no question as to where the files came from.</p>
<p><strong>On backup-server:</strong></p>
<pre>root@backup-server:# mkdir -p /var/tmp/backups/server.example.com
root@backup-server:# rdiff-backup test@server.example.com::/var/tmp/backmeup /var/tmp/backups/server.example.com/</pre>
<p>rdiff-backup has now created a mirror of the <strong>/var/tmp/backmeup</strong> directory from <strong>server.example.com</strong> in <strong>/var/tmp/backups/server.example.com</strong>.</p>
<pre>root@backup-server:# ls -la /var/tmp/backups/server.example.com/
total 52
drwxr-xr-x 3 root root 4096 May 19 13:07 .
drwxr-xr-x 3 root root 4096 May 19 13:53 ..
-rw-r--r-- 1 root root   25 May 19 13:07 10.file
-rw-r--r-- 1 root root   24 May 19 13:07 1.file
-rw-r--r-- 1 root root   24 May 19 13:07 2.file
-rw-r--r-- 1 root root   24 May 19 13:07 3.file
-rw-r--r-- 1 root root   24 May 19 13:07 4.file
-rw-r--r-- 1 root root   24 May 19 13:07 5.file
-rw-r--r-- 1 root root   24 May 19 13:07 6.file
-rw-r--r-- 1 root root   24 May 19 13:07 7.file
-rw-r--r-- 1 root root   24 May 19 13:07 8.file
-rw-r--r-- 1 root root   24 May 19 13:07 9.file
drwx------ 3 root root 4096 May 19 13:56 rdiff-backup-data</pre>
<p>Now that we have backed up the original file we will run a second backup to capture changed data; this time a with a little more verbosity.</p>
<pre>root@backup-server:# rdiff-backup -v5 test@server.example.com::/var/tmp/backmeup /var/tmp/backups/server.example.com/
Using rdiff-backup version 1.2.8
Executing ssh -C test@server.example.com rdiff-backup --server
&lt;truncated for length&gt;
Backup: must_escape_dos_devices = 0
Starting increment operation /var/tmp/backmeup to /var/tmp/backups/server.example.com
Processing changed file .
Incrementing mirror file /var/tmp/backups/server.example.com
Processing changed file 1.file
Incrementing mirror file /var/tmp/backups/server.example.com/1.file
Processing changed file 10.file
Incrementing mirror file /var/tmp/backups/server.example.com/10.file
Processing changed file 2.file
Incrementing mirror file /var/tmp/backups/server.example.com/2.file
Processing changed file 3.file
Incrementing mirror file /var/tmp/backups/server.example.com/3.file
Processing changed file 4.file
Incrementing mirror file /var/tmp/backups/server.example.com/4.file
Processing changed file 5.file
Incrementing mirror file /var/tmp/backups/server.example.com/5.file
Processing changed file 6.file
Incrementing mirror file /var/tmp/backups/server.example.com/6.file
Processing changed file 7.file
Incrementing mirror file /var/tmp/backups/server.example.com/7.file
Processing changed file 8.file
Incrementing mirror file /var/tmp/backups/server.example.com/8.file
Processing changed file 9.file
Incrementing mirror file /var/tmp/backups/server.example.com/9.file</pre>
<p>As you can see -v5 tells us what files are being processed, this is handy to see what is being backed up or being restored.</p>
<p>Now if we only change files 1 &#8211; 3 and run rdiff-backup again rdiff-backup should only backup files that have changed leaving the others alone.</p>
<pre>root@backup-server:# rdiff-backup -v5 test@server.example.com::/var/tmp/backmeup /var/tmp/backups/server.example.com/
Using rdiff-backup version 1.2.8
Executing ssh -C test@server.example.com rdiff-backup --server
&lt;truncated for length&gt;
Starting increment operation /var/tmp/backmeup to /var/tmp/backups/server.example.com
Processing changed file .
Incrementing mirror file /var/tmp/backups/server.example.com
Processing changed file 1.file
Incrementing mirror file /var/tmp/backups/server.example.com/1.file
Processing changed file 2.file
Incrementing mirror file /var/tmp/backups/server.example.com/2.file
Processing changed file 3.file
Incrementing mirror file /var/tmp/backups/server.example.com/3.file</pre>
<p>If we look at the backup directory the number of files has not changed, however the contents and time stamps have.</p>
<pre>root@backup-server:# ls -la /var/tmp/backups/server.example.com/
total 52
drwxr-xr-x 3 root root 4096 May 19 13:07 .
drwxr-xr-x 3 root root 4096 May 19 13:53 ..
-rw-r--r-- 1 root root   76 May 19 14:10 10.file
-rw-r--r-- 1 root root   98 May 19 14:16 1.file
-rw-r--r-- 1 root root   98 May 19 14:16 2.file
-rw-r--r-- 1 root root   98 May 19 14:16 3.file
-rw-r--r-- 1 root root   73 May 19 14:10 4.file
-rw-r--r-- 1 root root   73 May 19 14:10 5.file
-rw-r--r-- 1 root root   73 May 19 14:10 6.file
-rw-r--r-- 1 root root   73 May 19 14:10 7.file
-rw-r--r-- 1 root root   73 May 19 14:10 8.file
-rw-r--r-- 1 root root   73 May 19 14:10 9.file
drwx------ 3 root root 4096 May 19 14:16 rdiff-backup-data</pre>
<p>rdiff-backup will keep the current mirror unchanged and any differences will be kept in diff files within the rdiff-backup-data directory. It is not advised to modify or interact with the mirror or diff files directly, it is better to use the rdiff-backup command itself.</p>
<h2 id="section-6">Listing available backups</h2>
<p>To see the available backups we can use <strong>rdiff-backup -l</strong>.</p>
<pre>root@backup-server:# rdiff-backup -l /var/tmp/backups/server.example.com/
Found 5 increments:
    increments.2013-05-19T13:56:57-07:00.dir   Sun May 19 13:56:57 2013
    increments.2013-05-19T14:09:52-07:00.dir   Sun May 19 14:09:52 2013
    increments.2013-05-19T14:11:29-07:00.dir   Sun May 19 14:11:29 2013
    increments.2013-05-19T14:16:44-07:00.dir   Sun May 19 14:16:44 2013
    increments.2013-05-19T14:29:38-07:00.dir   Sun May 19 14:29:38 2013
Current mirror: Sun May 19 14:30:20 2013</pre>
<p>If a file has been deleted and rdiff-backup has ran since the file deletion you may not find the file in the directory, you can still however list the available backups for that file by specifying it as if it did exist.</p>
<pre> root@backup-server:# rdiff-backup -l /var/tmp/backups/server.example.com/1.file
Found 4 increments:
    1.file.2013-05-19T13:56:57-07:00.diff.gz   Sun May 19 13:56:57 2013
    1.file.2013-05-19T14:09:52-07:00.diff.gz   Sun May 19 14:09:52 2013
    1.file.2013-05-19T14:11:29-07:00.diff.gz   Sun May 19 14:11:29 2013
    1.file.2013-05-19T14:16:44-07:00.snapshot.gz   Sun May 19 14:16:44 2013
Current mirror: Sun May 19 14:30:20 2013</pre>
<h2 id="section-7">Restoring backed up files and directories</h2>
<p>rdiff-backup has the ability to restore either individual files or entire directories, as long as rdiff-backup has the item within its incremental lists.</p>
<h4 id="section-8">Restoring an individual file</h4>
<p>When restoring an individual file with rdiff-backup you can either specify a time or the incremental file to restore from. For  the following example I will show using the incremental file.</p>
<pre>root@backup-server:# cd server.example.com/rdiff-backup-data/increments/
root@backup-server:# rdiff-backup -v5 1.file.2013-05-19T14\:11\:29-07\:00.diff.gz test@server.example.com::/var/tmp/backmeup/1.file</pre>
<h4 id="section-9">Restoring a directory</h4>
<p>When restoring a directory however we will need to specify a specific time that we want to restore to.</p>
<pre>root@backup-server:# rdiff-backup -v5 -r 1h server.example.com/ test@server.example.com::/var/tmp/backmeup</pre>
<p>This command will restore the entire directory to where it was 1 hour ago or best it can depending on the backups available. rdiff-backup can support many time frames but I commonly find myself using the xDays format (e.g. 2D for 2 days).</p>
<h4 id="section-10">Don&#8217;t use the force flag</h4>
<p>While the above command will restore the whole directory it will only do so if the directory is empty. If the directory has files in it and you ask rdiff-backup to restore that directory than it will try to remove the existing files in order to match your backup. This action could result in data that has not been backed up being removed.</p>
<p>To protect against accidental deletion rdiff-backup requires the <strong>force</strong> flag to be used anytime a file is being overwritten or deleted.</p>
<pre>root@backup-server:# rdiff-backup -v5 -r 1h server.example.com/ test@server.example.com::/var/tmp/backmeup
Using rdiff-backup version 1.2.8
Executing ssh -C server.example.com rdiff-backup --server
Fatal Error: Restore target /var/tmp/backmeup already exists, specify --force to overwrite.</pre>
<p>I advise avoiding the use of the <strong>force</strong> flag whenever possible, if you truly do not want the contents of the directory than just remove them manually before restoring. I have seen many times where people used the <strong>force</strong> flag and accidentally overwrote a directory they did not mean (like /etc/ for example&#8230;).</p>
<h4 id="section-11">Restoring to another location</h4>
<p>When restoring with rdiff-backup you can restore files or directories to a location other than their originating source. This can be handy if you need to check the contents before completely restoring the file.</p>
<pre>root@backup-server:# rdiff-backup -v5 -r 3h server.example.com/1.file test@server.example.com::/var/tmp/backmeup/1.file.restore</pre>
<h2 id="section-12">Backup Retention</h2>
<p>Backups are only as good as their retention period, without a retention period you will eventually run out of disk space or use far more disk space than you had originally planned. rdiff-backup has the ability to maintain a certain number of incremental copies. With rdiff-backup you can tell it to either keep a backup for a certain amount of time or for a certain number of backups.</p>
<p><strong>On backup-server:</strong></p>
<h4 id="section-13">Time method</h4>
<p>The time method uses the same time format as restore.</p>
<pre>root@backup-server:# rdiff-backup --force --remove-older-than 4h /var/tmp/backups/server.example.com</pre>
<h4 id="section-14">Number of backups method</h4>
<p>To specify a number of backups use the number followed by a capital B.</p>
<pre>root@backup-server:# rdiff-backup --force --remove-older-than 4B /var/tmp/backups/server.example.com</pre>
<p>I used the <strong>force</strong> flag with the above commands as rdiff-backup requires <strong>force</strong> to be given if you are removing more than one incremental copy.</p>
<h2 id="section-15">Providing more access with sudo</h2>
<p>So far we have been backing up files and directories that the test user has access to; if we were to try and backup or restore a file that the test user does not have access to than the backup/restore will fail with a permission denied. To provide greater access you can either run rdiff-backup as the root user on the remote systems (which raises security concerns), or provide the test user with the ability to run rdiff-backup as the root user via sudo.</p>
<p><strong>Example of permission denied error:</strong></p>
<pre>root@backup-server:# rdiff-backup -v5 test@server.example.com::/var/tmp/backmeup /var/tmp/backups/server.example.com
Using rdiff-backup version 1.2.8
Executing ssh -C test@server.example.com rdiff-backup --server
Exception '[Errno 13] Permission denied: '/var/tmp/backmeup'' raised of class '&lt;type 'exceptions.OSError'&gt;':</pre>
<h4 id="section-16">Adding the rdiff-backup into /etc/sudoers</h4>
<p>In order to allow the test user the ability to run rdiff-backup as root we need to add an entry into the /etc/sudoers file, which controls what commands users can run via sudo. To modify this file we will use the visudo command.</p>
<p><strong>On server:</strong></p>
<pre>root@server:/var/tmp# visudo</pre>
<p><strong>Append:</strong></p>
<pre>## Give test user the ability to run rdiff-backup
test    ALL = NOPASSWD: /usr/bin/rdiff-backup --server</pre>
<p>As the test user you will now see rdiff-backup in the list of available sudo commands</p>
<pre>test@server:~$ sudo -l
User test may run the following commands on this host:
    (root) NOPASSWD: /usr/bin/rdiff-backup --server</pre>
<p>We are specifying <strong>NOPASSWD</strong> as by default sudo would normally ask the user for their password, which would not work very well with an automated backup script.</p>
<h4 id="section-17">Running rdiff-backup with remote-schema</h4>
<p>In order for rdiff-backup to use sudo we will need to change the command we have been using a bit; we will use the &#8211;remote-schema flag to tell rdiff-backup to run <strong>&#8220;sudo /usr/bin/rdiff-backup &#8211;server&#8221;</strong> on the remote system.</p>
<p><strong>On backup-server:</strong></p>
<p><strong>Backup command</strong></p>
<pre>root@backup-server:# rdiff-backup -v5 --remote-schema 'ssh -C %s "sudo /usr/bin/rdiff-backup --server"' \
test@server.example.com::/var/tmp/backmeup /var/tmp/backups/server.example.com

&lt;truncated&gt;
Processing changed file 9.file
Incrementing mirror file /var/tmp/backups/server.example.com/9.file</pre>
<p><strong>Restore command</strong></p>
<pre>root@backup-server:# rdiff-backup -v5 -r 3h --remote-schema 'ssh -C %s "sudo /usr/bin/rdiff-backup --server"' \
/var/tmp/backups/server.example.com/5.file test@server.example.com::/var/tmp/backmeup/5.file</pre>
<p>By adding sudo we are allowing the test user to backup and restore any file on the system with rdiff-backup.</p>
<h2 id="section-18">Adding restrict-read-only for even more security</h2>
<p>While using rdiff-backup with sudo prevents people from using the SSH key to login as root to all of our remote systems. This solution by itself does not restrict someone from using rdiff-backups restore function from deploying compromised files.</p>
<p>For even more security we can use the &#8211;restrict-read-only flag to restrict rdiff-backup to only being able to read files and blocking all write requests. The down side of this setting is that it also prevents valid restore requests as well. If you are more worried about someone accessing your systems than having to edit the sudoers file every time you want to restore a file; than this is a good option.</p>
<h4 id="section-19">Adding restrict-read-only to the sudoers entry</h4>
<p>In order to add &#8211;restrict-read-only we need to add it to both the rdiff-backup command and the sudoers entry.</p>
<pre>root@server# visudo</pre>
<p><strong>Modify to:</strong></p>
<pre>test    ALL = NOPASSWD: /usr/bin/rdiff-backup --server <strong>--restrict-read-only /</strong></pre>
<p>The / at the end is the path that you want rdiff-backup to be restricted to. This entry would give rdiff-backup the ability to backup all files on the system. If you are not backing up the entire system you can restrict this to a specific path as well to prevent rdiff-backup from reading other files on the system not within your path.</p>
<h4 id="section-20">Running the backup command with restrict-read-only</h4>
<p>Now that sudo allows us to run the full command we can add it to the remote-schema.</p>
<pre>root@backup-server:# rdiff-backup -v5 --remote-schema 'ssh -C %s "sudo /usr/bin/rdiff-backup --server --restrict-read-only /"' \
 test@server.example.com::/var/tmp/backmeup /var/tmp/backups/server.example.com
Using rdiff-backup version 1.2.8
Executing ssh -C test@server.example.com "sudo /usr/bin/rdiff-backup --server"</pre>
<p>If you modified the path in the sudoers file you would need to do the same with the rdiff-backup command above.</p>
<h2 id="section-21">Automating with Cron</h2>
<p>Automating rdiff-backup with cron is as simple as tossing the commands above into a script and adding it to the crontab. The below is meant only for example, I would advise anyone reading this to script in some more intelligence to handle failed backups and concurrent runs but if you needed something quick and dirty this would work.</p>
<p><strong>On backup-server:</strong></p>
<h4 id="section-22">Creating the backup script</h4>
<pre>root@backup-server# vi /root/backup-example.sh</pre>
<p><strong>Add:</strong></p>
<pre>#!/bin/bash
## Example rdiff-backup script - http://bencane.com
## This is not fancy, and you should really add error checking

# Backup
rdiff-backup -v5 --remote-schema 'ssh -C %s "sudo /usr/bin/rdiff-backup --server --restrict-read-only /"' \
 test@server.example.com::/var/tmp/backmeup /var/tmp/backups/server.example.com

# Clean Increments
rdiff-backup --force --remove-older-than 4B /var/tmp/backups/server.example.com</pre>
<h4 id="section-23">Adding to crontab</h4>
<p>Once you have the script you can simply add the script into the crontab on the <strong>backup-server</strong>.</p>
<pre>root@backup-server# crontab -e</pre>
<p><strong>Append:</strong></p>
<pre># m h  dom mon dow   command
0 0 * * * /root/backup-example.sh &gt; /dev/null 2&gt;&amp;1</pre>
<p>The above crontab entry will run backup-example.sh every night at midnight. This will provide you with 4 days of incremental copies at all times.</p>

	Tags: <a href="http://bencane.com/tags/backup-package/" title="backup package" rel="tag">backup package</a>, <a href="http://bencane.com/tags/backup-server/" title="backup server" rel="tag">backup server</a>, <a href="http://bencane.com/tags/backup-tool/" title="backup tool" rel="tag">backup tool</a>, <a href="http://bencane.com/tags/linux/" title="linux" rel="tag">linux</a>, <a href="http://bencane.com/tags/rdiff-backup/" title="rdiff-backup" rel="tag">rdiff-backup</a>, <a href="http://bencane.com/tags/red-hat/" title="red hat" rel="tag">red hat</a>, <a href="http://bencane.com/tags/sudo/" title="sudo" rel="tag">sudo</a>, <a href="http://bencane.com/tags/ubuntu/" title="ubuntu" rel="tag">ubuntu</a><br />
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/bencane/SAUo?a=-6eVmKIEO2k:fTVKae5BM6Q:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/bencane/SAUo?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bencane/SAUo?a=-6eVmKIEO2k:fTVKae5BM6Q:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/bencane/SAUo?i=-6eVmKIEO2k:fTVKae5BM6Q:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bencane/SAUo?a=-6eVmKIEO2k:fTVKae5BM6Q:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/bencane/SAUo?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bencane/SAUo?a=-6eVmKIEO2k:fTVKae5BM6Q:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/bencane/SAUo?i=-6eVmKIEO2k:fTVKae5BM6Q:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bencane/SAUo?a=-6eVmKIEO2k:fTVKae5BM6Q:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/bencane/SAUo?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bencane/SAUo?a=-6eVmKIEO2k:fTVKae5BM6Q:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/bencane/SAUo?i=-6eVmKIEO2k:fTVKae5BM6Q:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/bencane/SAUo/~4/-6eVmKIEO2k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://bencane.com/2013/05/securely-backing-up-your-files-with-rdiff-backup-and-sudo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
		<item>
		<title>How is my password stored in Linux?</title>
		<link>http://feedproxy.google.com/~r/lamolabs/~3/swQnrPXHSs4/</link>
		<comments>http://feedproxy.google.com/~r/lamolabs/~3/swQnrPXHSs4/#comments</comments>
		<pubDate>Sun, 19 May 2013 00:50:39 +0000</pubDate>
		<dc:creator>slmingol</dc:creator>
				<category><![CDATA[encryption]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[passwords]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[SHA-512]]></category>
		<category><![CDATA[shadow]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.lamolabs.org/blog/?p=10670</guid>
		<description><![CDATA[Background

<p>People that use Linux on a daily basis probably are completely oblivious to the actual mechanisms being used to store their passwords safely and securely on a given Linux system. Oh they might guess that their password is stored in the /etc/passwd file (they&#8217;d be wrong by the way) but most probably never even gave [...]</p>
<div> </div>
]]></description>
				<content:encoded><![CDATA[<h3>Background</h3>

<p>People that use Linux on a daily basis probably are completely oblivious to the actual mechanisms being used to store their passwords safely and securely on a given Linux system. Oh they might guess that their password is stored in the <code>/etc/passwd</code> file (they&#8217;d be wrong by the way) but most probably never even gave it a passing thought. So I thought I&#8217;d take the opportunity to shed some light on how Linux systems &#8220;stash&#8221; your precious password away.</p>

<h3>Solution</h3>

<p>So if your password isn&#8217;t actually stored in the <code>/etc/passwd</code> file then where does it get stored?</p>

<p>Answer: the <code>/etc/shadow</code> file. </p>

<p>This file is where all the keys to each user&#8217;s account are kept for safe keeping. Obviously only the root user can peer inside this file so all the commands we&#8217;ll be dealing with in this post, it should be assumed that you&#8217;ll need to either be root, or use <code>sudo</code> to run.</p>

<h5 class="line"><code>/etc/shadow</code></h5>

<p>A typical <code>/etc/shadow</code> entry:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p1067017"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p10670code17"><pre class="text" style="font-family:monospace;">root:$6$bbmDJwcZHy5bgEDz$kFO.W/T7nUqcszZWl5RglxoDDAcDxevWpHVfN3v3f.Cx2ZeMcn5PX23VvnnkgtNWZf8hYtqsL0pPkZqyj50NY/:14362:0:33333:7:::</pre></td></tr></table></div>




<p><strong style="color:red">NOTE1:</strong> <em style="color:gray">Don&#8217;t get too excited, the above isn&#8217;t really my entry, I made this one up.</em><br />
<strong style="color:red">NOTE2:</strong> <em style="color:gray">Each field is separated by a colon (:) &amp; we&#8217;re only concerned with the first two columns!</em></p>

<h5 class="line">dissecting the hash</h5>

<p>The key pieces to notice in that line of what looks like gibberish is the following:</p>


<ul>
<li>The first column, <code>root</code> is the user whom this entry belongs to from the <code>/etc/passwd</code> file.</li>
<li>The second column, <code>$6$.....</code> is essentially the user&#8217;s hashed password.</li>
</ul>



<p>Taking the second column apart further you should start to notice that&#8217;s it&#8217;s not complete gibberish after all. </p>

<p>For example:</p>


<ul>
<li>the first couple of characters, <code>$6$</code>, is a mark that tells the system what type of hashing was used to hash the password. </li>
<li>The text between the next set of dollar signs, <code>$bbmDJwcZHy5bgEDz$</code>, is the actual salt that was used to hash your password. </li>
<li>Everything else after, is your <b>password</b> + <b>salt</b> hashed using whatever hash function was specified at the beginning, <b>$6$</b>, in our example here.</li>
</ul>



<p>Specifically if you look at the man page for the crypt command, <a href="http://man7.org/linux/man-pages/man3/crypt.3.html"><code>man 3 crypt</code></a> there is a section that discusses what the <code>$6$</code> notation means:</p>

<blockquote><p>So $5$salt$encrypted is an <span class="caps">SHA</span>-256 encoded password and $6$salt$encrypted is an <span class="caps">SHA</span>-512 encoded one.</p></blockquote>

<p><strong style="color:red">NOTE:</strong> So in our case the <b>password</b> + <b>salt</b> is being hashed using the <a href="https://en.wikipedia.org/wiki/SHA-2"><span class="caps">SHA</span>-512</a> scheme.</p>

<h5 class="line">design details</h5>

<p><span id="more-10670"></span></p>

<p>For reference purposes here&#8217;s the rest of that excerpt from the crypt man page:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p1067018"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
</pre></td><td class="code" id="p10670code18"><pre class="text" style="font-family:monospace;">If salt is a character string starting with the characters &quot;$id$&quot; followed by a
string terminated by &quot;$&quot;:
&nbsp;
       $id$salt$encrypted
&nbsp;
then instead of using the DES machine, id identifies the encryption method used
and this then determines how the rest of the password string is interpreted.
The following values of id are supported:
&nbsp;
       ID  | Method
       ─────────────────────────────────────────────────────────
       1   | MD5
       2a  | Blowfish (not in mainline glibc; added in some
           | Linux distributions)
       5   | SHA-256 (since glibc 2.7)
       6   | SHA-512 (since glibc 2.7)
&nbsp;
So $5$salt$encrypted is an SHA-256 encoded password and $6$salt$encrypted is an
SHA-512 encoded one.
&nbsp;
&quot;salt&quot; stands for the up to 16 characters following &quot;$id$&quot; in the salt. The
encrypted part of the password string is  the actual computed password. The
size of this string is fixed:
&nbsp;
MD5     | 22 characters
SHA-256 | 43 characters
SHA-512 | 86 characters
&nbsp;
The characters in &quot;salt&quot; and &quot;encrypted&quot; are drawn from the set [a–zA–Z0–9./].
In the MD5 and SHA implementations the entire key is significant (instead of
only the first 8 bytes in DES).</pre></td></tr></table></div>




<h5 class="line">Now what?</h5>

<p>So by now you&#8217;re probably saying to yourself. <span class="caps">OK, </span>big deal, my password is hashed with some salt and stored in <code>/etc/shadow</code>. What else?</p>

<h5 class="line">generating the hash manually using <code>mkpasswd</code></h5>

<p>For starters you can generate the <code>$6$...</code> string yourself manually using the <code>mkpasswd</code> command:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p1067019"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p10670code19"><pre class="bash" style="font-family:monospace;">$ mkpasswd <span style="color: #660033;">-m</span> sha-512 password saltsalt
$<span style="color: #000000;">6</span><span style="color: #007800;">$saltsalt</span><span style="color: #007800;">$qFmFH</span>.bQmmtXzyBY0s9v7Oicd2z4XSIecDzlB5KiA2<span style="color: #000000; font-weight: bold;">/</span>jctKu9YterLp8wwnSq.qc.eoxqOmSuNp2xS0ktL3nh<span style="color: #000000; font-weight: bold;">/</span></pre></td></tr></table></div>




<p>In the above command we&#8217;re specifying that we want to use the <span class="caps">SHA</span>-512 hash, our password is the string <b>password</b> and our salt string is <b>saltsalt</b>. As before we can see in our resulting string the following components:</p>


<ul>
<li>$6$ &#8211; which hash function was used</li>
<li>saltsalt &#8211; the string &#8220;saltsalt&#8221; was used</li>
<li>qFmFH.bQmmtXzyBY0s9v7Oicd2z4XSIecDzlB5KiA2/jctKu9YterLp8wwnSq.qc.eoxqOmSuNp2xS0ktL3nh/ &#8211; <b>password</b> + <b>salt</b> hashed using <span class="caps">SHA</span>-512</li>
</ul>



<h5 class="line">generating the hash manually using Python</h5>

<p>I came across the following nice Python one-liner that effectively does the same thing as the <code>mkpasswd</code> command discussed above.</p>


<div class="wp_codebox"><table width="100%" ><tr id="p1067020"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p10670code20"><pre class="python" style="font-family:monospace;">$ python -c <span style="color: #483d8b;">&quot;import crypt, getpass, pwd; <span style="color: #000099; font-weight: bold;">\</span>
             print crypt.crypt('password', '<span style="color: #000099; font-weight: bold;">\$</span>6<span style="color: #000099; font-weight: bold;">\$</span>saltsalt<span style="color: #000099; font-weight: bold;">\$</span>')&quot;</span>
$<span style="color: #ff4500;">6</span>$saltsalt$qFmFH.<span style="color: black;">bQmmtXzyBY0s9v7Oicd2z4XSIecDzlB5KiA2</span>/jctKu9YterLp8wwnSq.<span style="color: black;">qc</span>.<span style="color: black;">eoxqOmSuNp2xS0ktL3nh</span>/</pre></td></tr></table></div>




<h5 class="line">generating the hash manually using Perl</h5>


<div class="wp_codebox"><table width="100%" ><tr id="p1067021"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p10670code21"><pre class="perl" style="font-family:monospace;">$ perl <span style="color: #339933;">-</span>e <span style="color: #ff0000;">'print crypt(&quot;password&quot;,&quot;\$6\$saltsalt\$&quot;) . &quot;\n&quot;'</span>
<span style="color: #0000ff;">$6</span><span style="color: #0000ff;">$saltsalt</span><span style="color: #0000ff;">$qFmFH</span><span style="color: #339933;">.</span>bQmmtXzyBY0s9v7Oicd2z4XSIecDzlB5KiA2<span style="color: #339933;">/</span>jctKu9YterLp8wwnSq<span style="color: #339933;">.</span>qc<span style="color: #339933;">.</span>eoxqOmSuNp2xS0ktL3nh<span style="color: #339933;">/</span></pre></td></tr></table></div>




<h5 class="line"><code>authconfig</code></h5>

<p>Before I wrap up I thought I&#8217;d mention one final tool <code>authconfig</code> that&#8217;s included on Red Hat distros such as Fedora, CentOS, and <span class="caps">RHEL.</span> This tool allows you to change what hash algorithm is being used on a particular system. The command to change a system to use <span class="caps">SHA</span>-512 would be as follows:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p1067022"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p10670code22"><pre class="bash" style="font-family:monospace;">authconfig –passalgo sha512 –update</pre></td></tr></table></div>




<p>See the man page for <code>authconfig</code> for more details.</p>

<h5 class="line">conclusions</h5>

<p>And with that you are now a little more in the know as to how Linux systems take your password and store them in the <code>/etc/shadow</code> file.</p>

<h3>References</h3>

<h5>links</h5>


<ul>
<li><a href="http://man7.org/linux/man-pages/man3/crypt.3.html">crypt man page</a></li>
<li><a href="http://ubuntuforums.org/showthread.php?t=1169551">Thread: generate hashed password for /etc/shadow &#8211; ubuntuforums.org</a></li>
<li><a href="http://openwall.info/wiki/john/Generating-test-hashes">How to produce test hashes for various formats</a></li>
<li><a href="http://aricgardner.com/commandlinefu/etc-shadow-fu/">Shadow Fu</a></li>
<li><a href="http://stackoverflow.com/questions/5171487/using-ruby-to-generate-sha512-crypt-style-hashes-formatted-for-etc-shadow">Using ruby to generate <span class="caps">SHA512 </span>crypt-style hashes formatted for /etc/shadow?</a></li>
<li><a href="http://sandilands.info/sgordon/calculate-sha-hash-of-linux-password-in-shadow-file">Calculate <span class="caps">SHA</span> Hash of Linux Password in Shadow File</a></li>
</ul>

<div class="wherego_related"> </div><img src="http://feeds.feedburner.com/~r/lamolabs/~4/swQnrPXHSs4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.lamolabs.org/blog/10670/how-is-my-password-stored-in-linux/feed/atom/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
		<item>
		<title>An Appreciation Of The Scale Of Spam</title>
		<link>http://blog.thistleweb.co.uk/18/05/2013/appreciation-scale-spam</link>
		<comments>http://blog.thistleweb.co.uk/18/05/2013/appreciation-scale-spam#comments</comments>
		<pubDate>Sat, 18 May 2013 16:27:07 +0000</pubDate>
		<dc:creator>ThistleWeb</dc:creator>
		
		<guid isPermaLink="false">http://www.linuxplanet.org/blogs/?guid=28c6145020c3eb5873b40bf177dbf1cf</guid>
		<description><![CDATA[When a variety of ISPs and services filter out most of it, you only get what slips through the net. I've noticed something that made me appreciate the scale of spam. My blog is tiny. I get perhaps an average of 100 views to any post that I make. I rare...]]></description>
				<content:encoded><![CDATA[<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>When a variety of ISPs and services filter out most of it, you only get what slips through the net. I've noticed something that made me appreciate the scale of spam. My blog is tiny. I get perhaps an average of 100 views to any post that I make. I rarely get comments, although I think that's normal for most blogs now, even those much more established and more popular than mine.</p>
<p>I use Drupal for my blog, with the Mollom module to deal with attempted spam in an intelligent way. Every time I check for comments held in moderation, it's often at 0, or the odd genuine comment. Every so often a spam comment gets through to there, but it's mostly empty.</p>
<p>I took a look at the events logs, in particular the Mollom logs for the last 3 days. I think each page shows about 50 entries, I've not counted them. Over the last week or so I've been experimenting with clearing the logs, and checking later to see how much it filled up and how fast. I was stunned.</p>
<p>In one 24hr period, it can often fill up 4 pages of log entries. That's 200 failed spam attempts in one single 24hr period. In many of these cases it's a Gmail account blasting through a batch of maybe 10 attempts in a minute, then again an hour later.</p>
<p>Apart from the odd comment, none of this is getting through. My real amazement was in just how much of this I was getting, and mainly from the angle of "this blog is a nothing blog, from a random Joe on the internet". I can't imagine the amount a household name site would get. It also gave me a new appreciation of just how much spam is filtered out before we even see it.</p>
<p>To all the organisations around the world who help keep our spam to a minimum, I humbly thank you.</p>
</div></div></div><div class="field field-name-field-blog-tags field-type-taxonomy-term-reference field-label-inline clearfix"><div class="field-label">Tags:&nbsp;</div><div class="field-items"><div class="field-item even"><a href="http://blog.thistleweb.co.uk/tags/spam" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Spam</a></div></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.linuxplanet.org/blogs/?feed=rss2&#038;p=52211</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
		<item>
		<title>How to rsync certain files, exclude the rest, all while ignoring .svn directories?</title>
		<link>http://feedproxy.google.com/~r/lamolabs/~3/61pwP6fK-rg/</link>
		<comments>http://feedproxy.google.com/~r/lamolabs/~3/61pwP6fK-rg/#comments</comments>
		<pubDate>Fri, 17 May 2013 22:16:12 +0000</pubDate>
		<dc:creator>slmingol</dc:creator>
				<category><![CDATA[rsync]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.lamolabs.org/blog/?p=10648</guid>
		<description><![CDATA[
<p>I came across this question on the Stack Exchange site Unix &#38; Linux. The question interested me so I answered it but thought I&#8217;d cross post it on my blog as well, given I took a pretty significant amount of time to put together a test case and write-up of how the solution ultimately worked.</p>

Problem

<p>I&#8217;m [...]</p>
<div>
<h3>Readers who viewed this page, also viewed:</h3>
<ul>
<li><a href="http://www.lamolabs.org/blog/74/formatting-text-using-textile/">Formatting text using Textile</a></li>
<li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/" rel="nofollow">Where did they go from here?</a>
</li>
</ul>
</div>
]]></description>
				<content:encoded><![CDATA[<p>I came across this question on the Stack Exchange site Unix &amp; Linux. The question interested me so I answered it but thought I&#8217;d cross post it on my blog as well, given I took a pretty significant amount of time to put together a test case and write-up of how the solution ultimately worked.</p>

<h3>Problem</h3>

<blockquote><p>I&#8217;m using rsync to copy some files from a share to another.</p>

<p>Recursively, I need to:</p>

<p>- delete files at the destination that are deleted in the origin<br />
- Only sync php and js files<br />
- exclude de rest of file types<br />
- Don&#8217;t delete .svn/ directory in the destination</p>

<p>If I use this:</p>

<p><code>rsync -zavC --delete --include='*.php' --include='*.js' --exclude=&quot;*&quot; /media/datacod/Test/ /home/lucas/Desktop/rsync/</code></p>

<p>Then <code>rsync</code> is not recursive because exclude=&#8221;*&#8221; excludes all files but also folders</p>

<p>If I add <code>--include=&quot;*/&quot;</code> then the <code>.svn/</code> directory gets deleted (it also gets included)</p>

<p>How can I solve this mind blasting dilemma?</p></blockquote>

<h3>Solution</h3>

<p>The solution I ultimately came up with made use of a little known feature, at least to me, called filters. Filters allow you to play games with the includes/excludes by protecting portions based on regular expressions. Read on, I&#8217;ll discuss them further down.</p>


<div class="wp_codebox"><table width="100%" ><tr id="p1064830"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p10648code30"><pre class="bash" style="font-family:monospace;">rsync <span style="color: #660033;">-avzC</span> <span style="color: #660033;">--filter</span>=<span style="color: #ff0000;">'-rs_*/.svn*'</span> <span style="color: #660033;">--include</span>=<span style="color: #ff0000;">&quot;*/&quot;</span> <span style="color: #660033;">--include</span>=<span style="color: #ff0000;">'*.js'</span> <span style="color: #660033;">--include</span>=<span style="color: #ff0000;">'*.php'</span> \
     <span style="color: #660033;">--exclude</span>=<span style="color: #ff0000;">&quot;*&quot;</span> <span style="color: #660033;">--delete</span> dir1<span style="color: #000000; font-weight: bold;">/</span> dir2<span style="color: #000000; font-weight: bold;">/</span></pre></td></tr></table></div>




<h3>test data</h3>

<p>To help determine if my solution was going to work or not I created some sample data so that I could test it out. For starters I wrote a script that would generate the data. Here&#8217;s that script, <code>setup_svn_sample.bash</code>:</p>

<p><span id="more-10648"></span></p>


<div class="wp_codebox"><table width="100%" ><tr id="p1064831"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code" id="p10648code31"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># setup .svn dirs</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #c20cb9; font-weight: bold;">dir</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>1,2<span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">dir</span><span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span>,<span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #000000; font-weight: bold;">/</span>.svn
&nbsp;
<span style="color: #666666; font-style: italic;"># fake data under .svn</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> dir1<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">dir</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>1,2,3,4<span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #000000; font-weight: bold;">/</span>.svn<span style="color: #000000; font-weight: bold;">/</span>origdir
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> dir2<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">dir</span><span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span>,<span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #000000; font-weight: bold;">/</span>.svn<span style="color: #000000; font-weight: bold;">/</span>keepdir
&nbsp;
<span style="color: #666666; font-style: italic;"># files to not sync</span>
<span style="color: #c20cb9; font-weight: bold;">touch</span> dir1<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">dir</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>1,2,3,4<span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">file</span><span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># files to sync</span>
<span style="color: #c20cb9; font-weight: bold;">touch</span> dir1<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">dir</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>1,2,3,4<span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #000000; font-weight: bold;">/</span>file1.js
<span style="color: #c20cb9; font-weight: bold;">touch</span> dir1<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">dir</span><span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span>,<span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #000000; font-weight: bold;">/</span>file1.php</pre></td></tr></table></div>




<p>Running the above script produces the following directories (<code>dir1</code> &amp; <code>dir2</code>):</p>

<p><b>source dir</b></p>


<div class="wp_codebox"><table width="100%" ><tr id="p1064832"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
</pre></td><td class="code" id="p10648code32"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">tree</span> <span style="color: #660033;">-a</span> dir1
dir1
<span style="color: #000000; font-weight: bold;">|</span>-- dir1
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">|</span>-- file1
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">|</span>-- file1.js
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">|</span>-- file1.php
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">|</span>-- file2
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">`</span>-- .svn
<span style="color: #000000; font-weight: bold;">|</span>       <span style="color: #000000; font-weight: bold;">`</span>-- origdir
<span style="color: #000000; font-weight: bold;">|</span>-- dir2
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">|</span>-- file1
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">|</span>-- file1.js
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">|</span>-- file1.php
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">|</span>-- file2
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">`</span>-- .svn
<span style="color: #000000; font-weight: bold;">|</span>       <span style="color: #000000; font-weight: bold;">`</span>-- origdir
<span style="color: #000000; font-weight: bold;">|</span>-- dir3
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">|</span>-- file1
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">|</span>-- file1.js
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">|</span>-- file1.php
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">|</span>-- file2
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">`</span>-- .svn
<span style="color: #000000; font-weight: bold;">|</span>       <span style="color: #000000; font-weight: bold;">`</span>-- origdir
<span style="color: #000000; font-weight: bold;">`</span>-- dir4
    <span style="color: #000000; font-weight: bold;">|</span>-- file1
    <span style="color: #000000; font-weight: bold;">|</span>-- file1.js
    <span style="color: #000000; font-weight: bold;">|</span>-- file1.php
    <span style="color: #000000; font-weight: bold;">|</span>-- file2
    <span style="color: #000000; font-weight: bold;">`</span>-- .svn
        <span style="color: #000000; font-weight: bold;">`</span>-- origdir</pre></td></tr></table></div>




<p><b>destination dir</b></p>


<div class="wp_codebox"><table width="100%" ><tr id="p1064833"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code" id="p10648code33"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">tree</span> <span style="color: #660033;">-a</span> dir2
dir2
<span style="color: #000000; font-weight: bold;">|</span>-- dir1
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">`</span>-- .svn
<span style="color: #000000; font-weight: bold;">|</span>       <span style="color: #000000; font-weight: bold;">`</span>-- keepdir
<span style="color: #000000; font-weight: bold;">|</span>-- dir2
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">`</span>-- .svn
<span style="color: #000000; font-weight: bold;">|</span>       <span style="color: #000000; font-weight: bold;">`</span>-- keepdir
<span style="color: #000000; font-weight: bold;">|</span>-- dir3
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">`</span>-- .svn
<span style="color: #000000; font-weight: bold;">|</span>       <span style="color: #000000; font-weight: bold;">`</span>-- keepdir
<span style="color: #000000; font-weight: bold;">`</span>-- dir4
    <span style="color: #000000; font-weight: bold;">`</span>-- .svn
        <span style="color: #000000; font-weight: bold;">`</span>-- keepdir</pre></td></tr></table></div>




<p>Running the above <code>rsync</code> command which includes the <code>--filter</code> below we can see that it&#8217;s only syncing the files that match the <code>--include</code> patterns:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p1064834"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code" id="p10648code34"><pre class="bash" style="font-family:monospace;">rsync <span style="color: #660033;">-avzC</span> <span style="color: #660033;">--filter</span>=<span style="color: #ff0000;">'-rs_*/.svn*'</span> <span style="color: #660033;">--include</span>=<span style="color: #ff0000;">&quot;*/&quot;</span> <span style="color: #660033;">--include</span>=<span style="color: #ff0000;">'*.js'</span> <span style="color: #660033;">--include</span>=<span style="color: #ff0000;">'*.php'</span> \
     <span style="color: #660033;">--exclude</span>=<span style="color: #ff0000;">&quot;*&quot;</span> <span style="color: #660033;">--delete</span> dir1<span style="color: #000000; font-weight: bold;">/</span> dir2<span style="color: #000000; font-weight: bold;">/</span>
sending incremental <span style="color: #c20cb9; font-weight: bold;">file</span> list
dir1<span style="color: #000000; font-weight: bold;">/</span>file1.js
dir1<span style="color: #000000; font-weight: bold;">/</span>file1.php
dir2<span style="color: #000000; font-weight: bold;">/</span>file1.js
dir2<span style="color: #000000; font-weight: bold;">/</span>file1.php
dir3<span style="color: #000000; font-weight: bold;">/</span>file1.js
dir3<span style="color: #000000; font-weight: bold;">/</span>file1.php
dir4<span style="color: #000000; font-weight: bold;">/</span>file1.js
dir4<span style="color: #000000; font-weight: bold;">/</span>file1.php
&nbsp;
sent 480 bytes  received 168 bytes  1296.00 bytes<span style="color: #000000; font-weight: bold;">/</span>sec
total <span style="color: #c20cb9; font-weight: bold;">size</span> is <span style="color: #000000;">0</span>  speedup is <span style="color: #000000;">0.00</span></pre></td></tr></table></div>




<p>Resulting <code>dir2</code> afterwards:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p1064835"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="code" id="p10648code35"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">tree</span> <span style="color: #660033;">-a</span> dir2
dir2
<span style="color: #000000; font-weight: bold;">|</span>-- dir1
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">|</span>-- file1.js
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">|</span>-- file1.php
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">`</span>-- .svn
<span style="color: #000000; font-weight: bold;">|</span>       <span style="color: #000000; font-weight: bold;">`</span>-- keepdir
<span style="color: #000000; font-weight: bold;">|</span>-- dir2
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">|</span>-- file1.js
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">|</span>-- file1.php
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">`</span>-- .svn
<span style="color: #000000; font-weight: bold;">|</span>       <span style="color: #000000; font-weight: bold;">`</span>-- keepdir
<span style="color: #000000; font-weight: bold;">|</span>-- dir3
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">|</span>-- file1.js
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">|</span>-- file1.php
<span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #000000; font-weight: bold;">`</span>-- .svn
<span style="color: #000000; font-weight: bold;">|</span>       <span style="color: #000000; font-weight: bold;">`</span>-- keepdir
<span style="color: #000000; font-weight: bold;">`</span>-- dir4
    <span style="color: #000000; font-weight: bold;">|</span>-- file1.js
    <span style="color: #000000; font-weight: bold;">|</span>-- file1.php
    <span style="color: #000000; font-weight: bold;">`</span>-- .svn
        <span style="color: #000000; font-weight: bold;">`</span>-- keepdir</pre></td></tr></table></div>




<h3>Why does it work?</h3>

<p>The key piece to this script is to make use of the filters capability of <code>rsync</code>. Filters allow you to remove files from the matched set at various points in the command. So in our case we&#8217;re filtering any files that match the pattern <code>*/.svn*</code>. The modifiers <code>-rs_</code> tell the filter that we want to filter on both the source side as well as the target side.</p>

<p><em>excerpt from the <span class="caps">FILTER NOTES </span>section of rsync&#8217;s man page</em></p>

<blockquote><p>- An <b>s</b> is used to indicate that the rule applies to the sending side. When a rule affects the sending side, it prevents files from  being <br />
transferred. The default is for a rule to affect both sides unless <code>--delete-excluded</code> was specified, in which case default rules become sender-side only.  See also the hide (H) and show (S) rules, which are an alternate way to specify sending-side includes/excludes.</p>

<p>- An <b>r</b>  is used to indicate that the rule applies to the receiving side. When a rule affects the receiving side, it prevents files from being deleted. See the s modifier for more info. See also the protect (P) and risk &#174; rules, which are an alternate way to specify receiver-side includes/excludes.</p></blockquote>

<p>See <a href="http://linux.die.net/man/1/rsync">man rsync</a> for more details.</p>

<h3>Tips for figuring this out (hint using <code>--dry-run</code>)</h3>

<p>While describing how to do this I thought I&#8217;d mention the <code>--dry-run</code> switch to <code>rsync</code>. It&#8217; extremely useful in seeing what will happen without having the <code>rsync</code> actually take place. </p>

<p><b>For Example</b></p>

<p>Using the following command will do a test run and show us the decision logic behind <code>rsync</code>:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p1064836"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
</pre></td><td class="code" id="p10648code36"><pre class="bash" style="font-family:monospace;">rsync <span style="color: #660033;">--dry-run</span> <span style="color: #660033;">-avvzC</span> <span style="color: #660033;">--filter</span>=<span style="color: #ff0000;">'-rs_*/.svn*'</span> <span style="color: #660033;">--include</span>=<span style="color: #ff0000;">&quot;*/&quot;</span> \
     <span style="color: #660033;">--include</span>=<span style="color: #ff0000;">'*.js'</span> <span style="color: #660033;">--include</span>=<span style="color: #ff0000;">'*.php'</span> <span style="color: #660033;">--exclude</span>=<span style="color: #ff0000;">&quot;*&quot;</span> <span style="color: #660033;">--delete</span> dir1<span style="color: #000000; font-weight: bold;">/</span> dir2<span style="color: #000000; font-weight: bold;">/</span>
sending incremental <span style="color: #c20cb9; font-weight: bold;">file</span> list
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> showing directory dir3 because of pattern <span style="color: #000000; font-weight: bold;">*/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> showing directory dir2 because of pattern <span style="color: #000000; font-weight: bold;">*/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> showing directory dir4 because of pattern <span style="color: #000000; font-weight: bold;">*/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> showing directory dir1 because of pattern <span style="color: #000000; font-weight: bold;">*/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> hiding <span style="color: #c20cb9; font-weight: bold;">file</span> dir1<span style="color: #000000; font-weight: bold;">/</span>file1 because of pattern <span style="color: #000000; font-weight: bold;">*</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> showing <span style="color: #c20cb9; font-weight: bold;">file</span> dir1<span style="color: #000000; font-weight: bold;">/</span>file1.js because of pattern <span style="color: #000000; font-weight: bold;">*</span>.js
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> hiding <span style="color: #c20cb9; font-weight: bold;">file</span> dir1<span style="color: #000000; font-weight: bold;">/</span>file2 because of pattern <span style="color: #000000; font-weight: bold;">*</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> showing <span style="color: #c20cb9; font-weight: bold;">file</span> dir1<span style="color: #000000; font-weight: bold;">/</span>file1.php because of pattern <span style="color: #000000; font-weight: bold;">*</span>.php
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> hiding directory dir1<span style="color: #000000; font-weight: bold;">/</span>.svn because of pattern <span style="color: #000000; font-weight: bold;">*/</span>.svn<span style="color: #000000; font-weight: bold;">*</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> hiding <span style="color: #c20cb9; font-weight: bold;">file</span> dir2<span style="color: #000000; font-weight: bold;">/</span>file1 because of pattern <span style="color: #000000; font-weight: bold;">*</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> showing <span style="color: #c20cb9; font-weight: bold;">file</span> dir2<span style="color: #000000; font-weight: bold;">/</span>file1.js because of pattern <span style="color: #000000; font-weight: bold;">*</span>.js
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> hiding <span style="color: #c20cb9; font-weight: bold;">file</span> dir2<span style="color: #000000; font-weight: bold;">/</span>file2 because of pattern <span style="color: #000000; font-weight: bold;">*</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> showing <span style="color: #c20cb9; font-weight: bold;">file</span> dir2<span style="color: #000000; font-weight: bold;">/</span>file1.php because of pattern <span style="color: #000000; font-weight: bold;">*</span>.php
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> hiding directory dir2<span style="color: #000000; font-weight: bold;">/</span>.svn because of pattern <span style="color: #000000; font-weight: bold;">*/</span>.svn<span style="color: #000000; font-weight: bold;">*</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> hiding <span style="color: #c20cb9; font-weight: bold;">file</span> dir3<span style="color: #000000; font-weight: bold;">/</span>file1 because of pattern <span style="color: #000000; font-weight: bold;">*</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> showing <span style="color: #c20cb9; font-weight: bold;">file</span> dir3<span style="color: #000000; font-weight: bold;">/</span>file1.js because of pattern <span style="color: #000000; font-weight: bold;">*</span>.js
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> hiding <span style="color: #c20cb9; font-weight: bold;">file</span> dir3<span style="color: #000000; font-weight: bold;">/</span>file2 because of pattern <span style="color: #000000; font-weight: bold;">*</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> showing <span style="color: #c20cb9; font-weight: bold;">file</span> dir3<span style="color: #000000; font-weight: bold;">/</span>file1.php because of pattern <span style="color: #000000; font-weight: bold;">*</span>.php
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> hiding directory dir3<span style="color: #000000; font-weight: bold;">/</span>.svn because of pattern <span style="color: #000000; font-weight: bold;">*/</span>.svn<span style="color: #000000; font-weight: bold;">*</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> hiding <span style="color: #c20cb9; font-weight: bold;">file</span> dir4<span style="color: #000000; font-weight: bold;">/</span>file1 because of pattern <span style="color: #000000; font-weight: bold;">*</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> showing <span style="color: #c20cb9; font-weight: bold;">file</span> dir4<span style="color: #000000; font-weight: bold;">/</span>file1.js because of pattern <span style="color: #000000; font-weight: bold;">*</span>.js
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> hiding <span style="color: #c20cb9; font-weight: bold;">file</span> dir4<span style="color: #000000; font-weight: bold;">/</span>file2 because of pattern <span style="color: #000000; font-weight: bold;">*</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> showing <span style="color: #c20cb9; font-weight: bold;">file</span> dir4<span style="color: #000000; font-weight: bold;">/</span>file1.php because of pattern <span style="color: #000000; font-weight: bold;">*</span>.php
<span style="color: #7a0874; font-weight: bold;">&#91;</span>sender<span style="color: #7a0874; font-weight: bold;">&#93;</span> hiding directory dir4<span style="color: #000000; font-weight: bold;">/</span>.svn because of pattern <span style="color: #000000; font-weight: bold;">*/</span>.svn<span style="color: #000000; font-weight: bold;">*</span>
delta-transmission disabled <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #7a0874; font-weight: bold;">local</span> transfer or <span style="color: #660033;">--whole-file</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>generator<span style="color: #7a0874; font-weight: bold;">&#93;</span> risking directory dir3 because of pattern <span style="color: #000000; font-weight: bold;">*/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>generator<span style="color: #7a0874; font-weight: bold;">&#93;</span> risking directory dir2 because of pattern <span style="color: #000000; font-weight: bold;">*/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>generator<span style="color: #7a0874; font-weight: bold;">&#93;</span> risking directory dir4 because of pattern <span style="color: #000000; font-weight: bold;">*/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>generator<span style="color: #7a0874; font-weight: bold;">&#93;</span> risking directory dir1 because of pattern <span style="color: #000000; font-weight: bold;">*/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>generator<span style="color: #7a0874; font-weight: bold;">&#93;</span> protecting directory dir1<span style="color: #000000; font-weight: bold;">/</span>.svn because of pattern <span style="color: #000000; font-weight: bold;">*/</span>.svn<span style="color: #000000; font-weight: bold;">*</span>
dir1<span style="color: #000000; font-weight: bold;">/</span>file1.js
dir1<span style="color: #000000; font-weight: bold;">/</span>file1.php
<span style="color: #7a0874; font-weight: bold;">&#91;</span>generator<span style="color: #7a0874; font-weight: bold;">&#93;</span> protecting directory dir2<span style="color: #000000; font-weight: bold;">/</span>.svn because of pattern <span style="color: #000000; font-weight: bold;">*/</span>.svn<span style="color: #000000; font-weight: bold;">*</span>
dir2<span style="color: #000000; font-weight: bold;">/</span>file1.js
dir2<span style="color: #000000; font-weight: bold;">/</span>file1.php
<span style="color: #7a0874; font-weight: bold;">&#91;</span>generator<span style="color: #7a0874; font-weight: bold;">&#93;</span> protecting directory dir3<span style="color: #000000; font-weight: bold;">/</span>.svn because of pattern <span style="color: #000000; font-weight: bold;">*/</span>.svn<span style="color: #000000; font-weight: bold;">*</span>
dir3<span style="color: #000000; font-weight: bold;">/</span>file1.js
dir3<span style="color: #000000; font-weight: bold;">/</span>file1.php
<span style="color: #7a0874; font-weight: bold;">&#91;</span>generator<span style="color: #7a0874; font-weight: bold;">&#93;</span> protecting directory dir4<span style="color: #000000; font-weight: bold;">/</span>.svn because of pattern <span style="color: #000000; font-weight: bold;">*/</span>.svn<span style="color: #000000; font-weight: bold;">*</span>
dir4<span style="color: #000000; font-weight: bold;">/</span>file1.js
dir4<span style="color: #000000; font-weight: bold;">/</span>file1.php
total: <span style="color: #007800;">matches</span>=0  <span style="color: #007800;">hash_hits</span>=0  <span style="color: #007800;">false_alarms</span>=0 <span style="color: #007800;">data</span>=0
&nbsp;
sent 231 bytes  received 55 bytes  572.00 bytes<span style="color: #000000; font-weight: bold;">/</span>sec
total <span style="color: #c20cb9; font-weight: bold;">size</span> is <span style="color: #000000;">0</span>  speedup is <span style="color: #000000;">0.00</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>DRY RUN<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></td></tr></table></div>




<p>In the above output you can see that the <code>./svn</code> directories are being protected by our filter rule. Valuable insight for debugging the <code>rsync</code>.</p>


<h3>References</h3>

<p>- <a href="http://unix.stackexchange.com/questions/5451/delete-extraneous-files-from-dest-dir-via-rsync">Delete extraneous files from dest dir via rsync?</a><br />
- <a href="http://www.lamolabs.org/blog/wp-content/uploads/2013/05/svn-test.tar.gz">Above scripts in a tarball</a></p><div class="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://www.lamolabs.org/blog/74/formatting-text-using-textile/"     class="wherego_title">Formatting text using Textile</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/" rel="nofollow">Where did they go from here?</a></li></ul></div><img src="http://feeds.feedburner.com/~r/lamolabs/~4/61pwP6fK-rg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.lamolabs.org/blog/10648/how-to-rsync-certain-files-exclude-the-rest-all-while-ignoring-svn-directories/feed/atom/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
		<item>
		<title>Advanced Streaming Format (ASF) Demuxer</title>
		<link>http://www.whitemiceconsulting.com/2013/05/advanced-streaming-format-asf-demuxer.html</link>
		<comments>http://www.whitemiceconsulting.com/2013/05/advanced-streaming-format-asf-demuxer.html#comments</comments>
		<pubDate>Wed, 15 May 2013 17:01:00 +0000</pubDate>
		<dc:creator>whitemice</dc:creator>
				<category><![CDATA[asf]]></category>
		<category><![CDATA[Gnome]]></category>
		<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[openSUSE]]></category>
		<category><![CDATA[totem]]></category>
		<category><![CDATA[wmv]]></category>
		<category><![CDATA[zypper]]></category>

		<guid isPermaLink="false">http://www.linuxplanet.org/blogs/?guid=3ee42b125806c5730cd68b6da5223c3f</guid>
		<description><![CDATA[You go to open a WMV video file in Nautilus on a new GNOME install, GNOME Video opens, and you are immediately greeted with: "Advanced Streaming Format (ASF) demuxer".&#160; A message that is terribly helpfully, but at least it offers to "Search" for a...]]></description>
				<content:encoded><![CDATA[<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-_Y_80Xz-Gh4/UZO82K_NpsI/AAAAAAAAAIQ/OhnsfC9dMsQ/s1600/VideosASF.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div><a href="http://2.bp.blogspot.com/-_Y_80Xz-Gh4/UZO82K_NpsI/AAAAAAAAAIQ/OhnsfC9dMsQ/s1600/VideosASF.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img alt="" border="0" height="188" src="http://2.bp.blogspot.com/-_Y_80Xz-Gh4/UZO82K_NpsI/AAAAAAAAAIQ/OhnsfC9dMsQ/s400/VideosASF.png" title="" width="400" /></a>You go to open a WMV video file in Nautilus on a new <a href="http://www.gnome.org/">GNOME</a> install, <a href="http://projects.gnome.org/totem/">GNOME Video </a>opens, and you are immediately greeted with: "<span style="color: red;">Advanced Streaming Format (ASF) demuxe</span>r".&nbsp; A message that is terribly helpfully, but at least it offers to "Search" for a solution. The auto-find-the-solution button works sometimes, but not always.&nbsp; An easier solution is to preemptively install the required packages.&nbsp; <br /><blockquote class="tr_bq"><span style="color: blue;">zypper ar http://ftp.gwdg.de/pub/linux/packman/suse/openSUSE_12.3 packman<br />zypper in gstreamer-plugins-bad-orig-addon gstreamer-plugins-libav<br />gstreamer-plugins-ugly-orig-addon w32codec-all</span><br /><i><span style="color: #cc0000;">Add the Packman repository and install the required packages.</span></i></blockquote>The package install may prompt you to allow a vendor change (from the 'official' <a href="http://www.opensuse.org/en/">openSUSE</a> repository to the <a href="http://opensuse-community.org/Repositories/Packman">Packman</a> repository).&nbsp; This vendor change is desired so it should be allowed.&nbsp; Once the packages are installed GNOME Video player should play <a href="http://en.wikipedia.org/wiki/Windows_Media_Video">WMV</a> files which use ASF multiplexing without further complaint.<br /><blockquote class="tr_bq"><b>Aside:&nbsp; </b>If you don't want to be pestered about package vendor changes in the future you can edit&nbsp; <span style="color: blue;">/etc/zypp/zypp.conf</span> and set "<span style="color: blue;">solver.allowVendorChange = true</span><span style="color: black;">"</span>.&nbsp; But don't do that unless you know what that means.</blockquote><br /><br /> ]]></content:encoded>
			<wfw:commentRss>http://www.whitemiceconsulting.com/feeds/6195790724165841572/comments/default</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
		<item>
		<title>Syrian Options</title>
		<link>http://feedproxy.google.com/~r/blogspot/usuXy/~3/hoJ986Rx5QE/syrian-options.html</link>
		<comments>http://feedproxy.google.com/~r/blogspot/usuXy/~3/hoJ986Rx5QE/syrian-options.html#comments</comments>
		<pubDate>Wed, 15 May 2013 13:09:00 +0000</pubDate>
		<dc:creator>Binh Nguyen</dc:creator>
				<category><![CDATA[conflict]]></category>
		<category><![CDATA[options]]></category>
		<category><![CDATA[Syria]]></category>

		<guid isPermaLink="false">http://www.linuxplanet.org/blogs/?guid=474df2501001c34c041992b9104816e5</guid>
		<description><![CDATA[
The Syrian uprising has ballooned into a catasrophe on many levels after several years of fighting and it shows no signs of abating. Let's explore some of the options available to us:

- attempt to negotiate a ceasefire. It's clear that this is unlike...]]></description>
				<content:encoded><![CDATA[<div style="text-align: justify;">
The Syrian uprising has ballooned into a catasrophe on many levels after several years of fighting and it shows no signs of abating. Let's explore some of the options available to us:<br />
<br />
- attempt to negotiate a ceasefire. It's clear that this is unlikely to hold though. It also feels as though a lot of previous attempts have been disengenuous or have been used to stall, seeking better terms, etc... Believe that only if there is greater force applied will be hold (more on this later).<br />
<a href="http://www.foxnews.com/world/2013/05/14/syria-wants-details-about-us-russian-initiative-before-deciding-whether-to/">http://www.foxnews.com/world/2013/05/14/syria-wants-details-about-us-russian-initiative-before-deciding-whether-to/</a><br />
<a href="http://www.nytimes.com/2013/05/15/world/middleeast/syria-developments.html?_r=0">http://www.nytimes.com/2013/05/15/world/middleeast/syria-developments.html?_r=0</a><br />
<a href="http://english.alarabiya.net/en/views/news/middle-east/2013/05/15/Is-it-a-peace-or-war-plan-for-Syria-.html">http://english.alarabiya.net/en/views/news/middle-east/2013/05/15/Is-it-a-peace-or-war-plan-for-Syria-.html</a> <br />
<a href="http://www.un.org/News/dh/infocus/Syria/FinalCommuniqueActionGroupforSyria.pdf">http://www.un.org/News/dh/infocus/Syria/FinalCommuniqueActionGroupforSyria.pdf</a><br />
- increased support for the rebellion. It's not entirely clear just what exactly we're supporting here (if concerned about longer term spread of weapons from conflict develop/consider stronger but limited lifetime weapons). It was previously a peaceful uprising but it has since turned into violence with the problem excerbated by foreign combantants and groups who share links with terrorist groups and have other interests besides that of the Syrian people. Violations and various atrocities (from both sides) need to be dealt with as well.<br />
<a href="http://www.theaustralian.com.au/news/breaking-news/syria-oppn-condemns-heart-eating-video/story-fn3dxix6-1226642510509">http://www.theaustralian.com.au/news/breaking-news/syria-oppn-condemns-heart-eating-video/story-fn3dxix6-1226642510509</a><a href="http://worldnews.nbcnews.com/_news/2013/05/14/18244907-sheer-savagery-syrian-rebel-rips-out-soldiers-heart-human-rights-watch-says?lite">http://worldnews.nbcnews.com/_news/2013/05/14/18244907-sheer-savagery-syrian-rebel-rips-out-soldiers-heart-human-rights-watch-says?lite</a><br />
<a href="http://www.dailystar.com.lb/News/Middle-East/2013/May-15/217157-syria-rebels-vow-to-punish-those-committing-atrocities.ashx">http://www.dailystar.com.lb/News/Middle-East/2013/May-15/217157-syria-rebels-vow-to-punish-those-committing-atrocities.ashx</a></div>
<div style="text-align: justify;">
<a href="http://www.guardian.co.uk/world/2013/apr/28/syrian-nerve-gas-claims-eyewitness">http://www.guardian.co.uk/world/2013/apr/28/syrian-nerve-gas-claims-eyewitness</a><br />
<a href="http://original.antiwar.com/srichman/2013/05/14/no-intervention-in-syria/">http://original.antiwar.com/srichman/2013/05/14/no-intervention-in-syria/</a><br />
- direct and full intervention/invasion. We've seen Iraq/Afghanistan weren't clear cut and this one is probably going to be just as difficult if more so (how could we possibly make it any worse than it currently is?). It's also becoming clear that surrounding countries are already getting dragged in with regards to both the humantarian problem as well as the conflict itself with many of them being used as launchpads or support for military action in Syria itself. Invasion should be considered an option but only if all other options have been exhausted and have been proven to be unworthwhile.<a href="http://www.usnews.com/opinion/blogs/world-report/2013/05/15/turkey-hopes-to-convince-us-to-act-in-syria">http://www.usnews.com/opinion/blogs/world-report/2013/05/15/turkey-hopes-to-convince-us-to-act-in-syria</a><br />
- de-militarise the conflict. This means that no more (ANY) weapons whether are to be supplied to either side whether that means re-supply, fulfilling existing contracts, etc...<br />
<a href="http://world.time.com/2013/05/14/putin-netanyahu-meet-to-discuss-syria/">http://world.time.com/2013/05/14/putin-netanyahu-meet-to-discuss-syria/</a><br />
Hopefully, this will also make both sides more amenable to genuine peace talks (clearly, will not work if one side continues to arm though). <br />
- direct but limited intervention. One option that I've been considering is destroying all air-fields/military bases/large clusters of heavy weapons/artillery/munitions and so on, shutting down all borders inbound to Syria (not easy). This will result in a stalemate situation (especially if the neither side are continued to be supplied with weapons).<br />
<a href="http://www.washingtonpost.com/blogs/worldviews/wp/2013/05/13/six-ways-assad-has-turned-the-tide-in-syria/">http://www.washingtonpost.com/blogs/worldviews/wp/2013/05/13/six-ways-assad-has-turned-the-tide-in-syria/</a><br />
<a href="http://www.npr.org/2013/04/30/179855633/c-j-chivers-on-the-ground-in-syria">http://www.npr.org/2013/04/30/179855633/c-j-chivers-on-the-ground-in-syria</a><br />
Hopefully, this will also make both sides more amenable to genuine peace talks (clearly, will not work if one side continues to arm though). Another option that has been widely considered is targeted, direct action against regime leadership. There will of course be repercussions should this avenue be pursued...<br />
- a pure peace keeping intervention? Long range strikes (as outlined in previous point) combined with an international, armed peace keeping ground force (rules of engagement mean that they their primary job will be to defend non combatants, themselves, and finally to maintain peace)? Peace keeping force must have clear agenda and provide prior warning. If there is any untoward activity they have a go ahead to use force to stop it whether that pertains to rebel or regime activity. It can not be stressed enough that this peace keeping force is not about joining in the conflict. It is about stopping it and getting back to normality as quickly as possible. Obvious problem is whether or not the fighting will simply start up again the minute the peace keeping force leaves?<br />
- let them continue to fight it out until it's conclusion. Cynical but it also means that one side is likely to be a more complete victor which may result in a more stable long term situation.<br />
- offer the current regime safe passage out. Unlikely to be accepted given some of the messages that have been sent out.<br />
- don't bother trying to implement a ceasefire prior to creating a transition plan or running an election? If both sides can just maintain peace on their side of the conflict (clear lines of demarcation and buffer zones so that we can minimise break outs of fighting) while elections (obvious problems here especially vote those relating to 'tampering') are running perhaps we can figure out just exactly what the Syrian people actually want (this will also mean that we can disavow everyone of all possible doubt over what the desire of the actual Syrian population is). Who's in charge of running election? A combination of existing regime/rebels/neighbours with international observers? How can you when so many people are displaced (people in refugee camps in particular)? Require identification for them to participate while existing people can simply show up at polling booths. How much will displaced people skew the results of any potential election. Obvious questions are, whether they want existing regime or rebels to succeed? What should be the timeline going forward? How is normal life going to be restored? etc...<br />
- break up of the country should be considered if it means a cessation of hostilities in spite of warnings.<br />
<a href="http://www.presstv.ir/detail/2013/05/14/303424/iran-warns-against-syria-disintegration/">http://www.presstv.ir/detail/2013/05/14/303424/iran-warns-against-syria-disintegration/</a><br />
- half baked measures so far have proven unlikely to turn the tide. If there is intervention (in any form whether diplomatic, military, etc...) there must be far greater force behind it to simply get it over and done with so that everyone can get on with their lives.<br />
- don't go into talks with any pre-conditions. Push hard but give peace a genuine chance. Not sure how some people can be so optimistic that UN June 12 plan has a genuine chance given the fact that the conflict has continued unabated and esclated for several years (I've said before and I'll say it again defense, intelligence, and defense should work together and only be pressing harder will be able to force a cessation of hostilities.).<br />
<a href="http://english.alarabiya.net/en/perspective/analysis/2013/05/14/Arabs-Turkey-see-no-role-for-Assad-in-future-Syria-.html">http://english.alarabiya.net/en/perspective/analysis/2013/05/14/Arabs-Turkey-see-no-role-for-Assad-in-future-Syria-.html</a><br />
http://www.un.org/News/dh/infocus/Syria/FinalCommuniqueActionGroupforSyria.pdf<br />
- provide flares and other camouflage options because it's clear that most of the weapons involved are fairly simple/non-guidance based. Likelihood that they will resort to carpet/cluster bombing even though they are already using makeshift weapons?<br />
<br />
Key questions/issues:<br />
- can you honestly say that Assad is fit and do the Syrian people want him to lead Syria?<br />
- if there is intervention and there is a power vacuum is this worse than what would occur if we didn't intervene?<br />
- the style/size of the intervention. Direct, continued covert, etc...<br />
- even if we aren't directly involved what are the indirect impacts of continued conflict in Syria?<br />
- will any leadership be better/worse than the previous one?<br />
- what other moves are other stakeholders likely to make should further direct/indirect action occur?<br />
- even if there is a transition is it going to be representative and will it hold?<br />
<a href="http://au.news.yahoo.com/world/a/-/world/17146065/france-sees-snags-in-plans-for-syria-peace-talks/">http://au.news.yahoo.com/world/a/-/world/17146065/france-sees-snags-in-plans-for-syria-peace-talks/</a><br />
<a href="http://www.naharnet.com/stories/en/82916-france-warns-syria-conference-will-be-very-difficult">http://www.naharnet.com/stories/en/82916-france-warns-syria-conference-will-be-very-difficult</a><br />
<a href="http://www.globalresearch.ca/obama-cameron-hold-syria-war-summit-in-washington-more-weapons-for-al-qaeda/5334993">http://www.globalresearch.ca/obama-cameron-hold-syria-war-summit-in-washington-more-weapons-for-al-qaeda/5334993</a><br />
- if there is intervention does the International community support or lead?<br />
- are current peace talk offers genuine?<br />
- limited public support/appetite for intervention.<br />
- the longer the fight goes on the more desperate people have become. Concern is that either solution breaks down because new leadership may be just as bad or worse than previously or else it breaks down simply because they aren't strong enough to deal with the issues that continue to stem from this conflict.<br />
- is this a situation that needs to be 'managed' because it can't be fixed completely in future without long term commitment?<br />
- something which needs to be kept in mind is that many International bodies need reform or are simply losing their relevance. I think that the after several recent incidents the United Nations is beginning to fall into this category as well. In which case, I think the question we should all be asking ourselves is whether some&nbsp; the power plays that are occurring are really worth it. At some point this isn't a question of interests, it's a question of humanity. It's a question of being able to distinguish between right and wrong, between human and primitive animal. If the United Nations doesn't give us the ability to do what is required, what is right in order to end this situation then the International community must surely see fit to either change the existing frameworks stopping us from doing so or find a way of working around them.<br />
<a href="http://fullcomment.nationalpost.com/2013/05/13/jonathan-kay-forget-red-lines-for-assad-its-time-to-start-saving-innocent-syrian-civilians/">http://fullcomment.nationalpost.com/2013/05/13/jonathan-kay-forget-red-lines-for-assad-its-time-to-start-saving-innocent-syrian-civilians/</a><br />
<br />
<a href="http://www.un.org/News/dh/infocus/Syria/FinalCommuniqueActionGroupforSyria.pdf">http://www.un.org/News/dh/infocus/Syria/FinalCommuniqueActionGroupforSyria.pdf</a><br />
<a href="http://abcnews.go.com/US/wireStory/assembly-expected-approve-syria-resolution-19181298">http://abcnews.go.com/US/wireStory/assembly-expected-approve-syria-resolution-19181298</a><br />
<a href="http://blogs.reuters.com/great-debate/2013/05/14/learning-the-wrong-lessons-from-israels-intervention-in-syria/">http://blogs.reuters.com/great-debate/2013/05/14/learning-the-wrong-lessons-from-israels-intervention-in-syria/</a><br />
<a href="http://www.irishtimes.com/news/world/middle-east/no-fly-zone-is-best-of-bad-options-for-syria-1.1393250">http://www.irishtimes.com/news/world/middle-east/no-fly-zone-is-best-of-bad-options-for-syria-1.1393250</a><br />
<a href="http://www.news.com.au/world-news/australian-aid-may-be-propping-up-syrian-regime/story-fndir2ev-1226642141799">http://www.news.com.au/world-news/australian-aid-may-be-propping-up-syrian-regime/story-fndir2ev-1226642141799</a><br />
<a href="http://www.japantimes.co.jp/news/2013/05/15/world/syria-forum-prompts-guarded-optimism/">http://www.japantimes.co.jp/news/2013/05/15/world/syria-forum-prompts-guarded-optimism/</a><br />
<a href="http://www.guardian.co.uk/commentisfree/2013/may/13/syria-post-superpower-era-obama-indecision">http://www.guardian.co.uk/commentisfree/2013/may/13/syria-post-superpower-era-obama-indecision</a><br />
<a href="http://www.washingtonpost.com/world/assad-forces-gaining-ground-in-syria/2013/05/11/79147c34-b99c-11e2-b568-6917f6ac6d9d_story.html">http://www.washingtonpost.com/world/assad-forces-gaining-ground-in-syria/2013/05/11/79147c34-b99c-11e2-b568-6917f6ac6d9d_story.html</a><br />
<a href="http://news.xinhuanet.com/english/world/2013-05/14/c_132379592.htm">http://news.xinhuanet.com/english/world/2013-05/14/c_132379592.htm</a><br />
<a href="http://www.nytimes.com/2013/04/30/opinion/ill-considered-advice-on-syria.html?_r=0">http://www.nytimes.com/2013/04/30/opinion/ill-considered-advice-on-syria.html?_r=0</a><br />
<a href="http://www.washingtonpost.com/world/national-security/iraq-history-at-bush-center-shows-need-for-caution-on-syria/2013/04/29/ea124816-ae80-11e2-98ef-d1072ed3cc27_story.html">http://www.washingtonpost.com/world/national-security/iraq-history-at-bush-center-shows-need-for-caution-on-syria/2013/04/29/ea124816-ae80-11e2-98ef-d1072ed3cc27_story.html</a><br />
<a href="http://www.pbs.org/newshour/bb/world/jan-june13/syria2_04-29.html">http://www.pbs.org/newshour/bb/world/jan-june13/syria2_04-29.html</a><br />
<a href="http://www.wired.com/dangerroom/2013/05/syria-weapons-2/">http://www.wired.com/dangerroom/2013/05/syria-weapons-2/</a><br />
<a href="http://www.globalresearch.ca/obama-cameron-hold-syria-war-summit-in-washington-more-weapons-for-al-qaeda/5334993">http://www.globalresearch.ca/obama-cameron-hold-syria-war-summit-in-washington-more-weapons-for-al-qaeda/5334993</a><br />
<a href="http://www.nytimes.com/2013/05/15/world/middleeast/syria-developments.html?_r=0">http://www.nytimes.com/2013/05/15/world/middleeast/syria-developments.html?_r=0</a><br />
<a href="http://www.bangkokpost.com/news/world/349997/putin-netanyahu-set-for-talks-on-syria">http://www.bangkokpost.com/news/world/349997/putin-netanyahu-set-for-talks-on-syria</a><br />
<a href="http://www.thehindu.com/opinion/op-ed/russia-plays-the-missile-card/article4712306.ece">http://www.thehindu.com/opinion/op-ed/russia-plays-the-missile-card/article4712306.ece</a></div>
<img src="http://feeds.feedburner.com/~r/blogspot/usuXy/~4/hoJ986Rx5QE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.linuxplanet.org/blogs/?feed=rss2&#038;p=52195</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
		<item>
		<title>WOOT!  Linux Mint 15 “Olivia” RC candidate released.</title>
		<link>http://lincgeek.org/blog/?p=2325</link>
		<comments>http://lincgeek.org/blog/?p=2325#comments</comments>
		<pubDate>Wed, 15 May 2013 11:47:10 +0000</pubDate>
		<dc:creator>linc</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Mint]]></category>

		<guid isPermaLink="false">http://lincgeek.org/blog/?p=2325</guid>
		<description><![CDATA[Yes, you heard it right! Get your backups up to date and your gear ready for the next release of the best Linux distribution available. Grab it here:]]></description>
				<content:encoded><![CDATA[<p><div id="attachment_383" class="wp-caption alignleft" style="width: 160px"><a href="http://lincgeek.org/blog/wp-content/uploads/2009/05/lm.png"><img src="http://lincgeek.org/blog/wp-content/uploads/2009/05/lm-150x150.png" alt="Linux Mint" width="150" height="150" class="size-thumbnail wp-image-383" /></a><p class="wp-caption-text">Linux Mint</p></div><br />
Yes, <a href="http://forums.linuxmint.com/viewtopic.php?f=60&#038;p=718841">you heard it right</a>!  Get your backups up to date and your gear ready for the next release of the best Linux distribution available.  <a href="http://community.linuxmint.com/iso">Grab it here:</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lincgeek.org/blog/?feed=rss2&#038;p=2325</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
	</channel>
</rss>
