<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Frank Seitz - Developer Logbuch - rsync</title>
    <link>http://fseitz.de/blog/</link>
    <description>Notizen aus der Welt der Web-, Datenbank- und Unix-Programmierung</description>
    <dc:language>de</dc:language>
    <generator>Serendipity 1.5.1 - http://www.s9y.org/</generator>
    <pubDate>Sat, 27 Mar 2010 11:23:08 GMT</pubDate>

    <image>
        <url>http://fseitz.de/blog/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Frank Seitz - Developer Logbuch - rsync - Notizen aus der Welt der Web-, Datenbank- und Unix-Programmierung</title>
        <link>http://fseitz.de/blog/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Rsync: Abweichende Rechte einstellen</title>
    <link>http://fseitz.de/blog/index.php?/archives/26-Rsync-Abweichende-Rechte-einstellen.html</link>
            <category>rsync</category>
    
    <comments>http://fseitz.de/blog/index.php?/archives/26-Rsync-Abweichende-Rechte-einstellen.html#comments</comments>
    <wfw:comment>http://fseitz.de/blog/wfwcomment.php?cid=26</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://fseitz.de/blog/rss.php?version=2.0&amp;type=comments&amp;cid=26</wfw:commentRss>
    

    <author>nospam@example.com (Frank Seitz)</author>
    <content:encoded>
    &lt;p class=&quot;sdoc-para-p&quot;&gt;
  Mit der Option &lt;tt class=&quot;sdoc-seg-c&quot;&gt;-a&lt;/tt&gt; führt &lt;tt class=&quot;sdoc-seg-c&quot;&gt;rsync&lt;/tt&gt; den Abgleich im &amp;#132;Archive Mode&amp;#148;
  durch, d.h. Symlinks, Devices, Permissions, Ownerschaft usw. werden
  auf die Zielmaschine transferiert.
&lt;/p&gt;
&lt;p class=&quot;sdoc-para-p&quot;&gt;
  Was aber, wenn gewisse Unterschiede erforderlich sind, z.B. die
  Ownerschaft einiger Dateien verschieden sein muss, weil
  der Owner oder die Group auf der Zielmaschine anders heißen?
&lt;/p&gt;
&lt;p class=&quot;sdoc-para-p&quot;&gt;
  Beispiel: Die Group des HTTP-Servers heißt auf der
  einen Maschine &amp;#132;www-data&amp;#148; während sie auf der anderen Maschine
  &amp;#132;apache&amp;#148; heißt. Über die Group bekommt der HTTP-Server
  Rechte auf bestimmten Dateien eingeräumt, sie muss
  also passend zur Maschine gesetzt sein.
&lt;/p&gt;
&lt;p class=&quot;sdoc-para-p&quot;&gt;
  Solche Differenzen kann &lt;tt class=&quot;sdoc-seg-c&quot;&gt;rsync&lt;/tt&gt; nicht auflösen und bietet auch keine
  Option hierfür. Es lässt sich aber mit einem nachgeschalteten
  Shell-Skript erreichen, das via &lt;tt class=&quot;sdoc-seg-c&quot;&gt;ssh&lt;/tt&gt; auf der Zielmaschine ausgeführt
  wird:
&lt;/p&gt;
&lt;div class=&quot;sdoc-code-div&quot;&gt;
  &lt;pre class=&quot;sdoc-code-pre&quot;&gt;rsync -az --delete -e ssh DIR1/ USER@HOST:DIR2&amp;#10;ssh USER@HOST CMD&lt;/pre&gt;
&lt;/div&gt;
&lt;p class=&quot;sdoc-para-p&quot;&gt;
  Wird &lt;i class=&quot;sdoc-seg-i&quot;&gt;CMD&lt;/i&gt; in &lt;i class=&quot;sdoc-seg-i&quot;&gt;DIR1&lt;/i&gt; abgelegt, wird es durch den &lt;tt class=&quot;sdoc-seg-c&quot;&gt;rsync&lt;/tt&gt;-Aufruf
  mit verwaltet, also automatisch auf dem neusten Stand gehalten.
&lt;/p&gt; 
    </content:encoded>

    <pubDate>Fri, 29 Jan 2010 17:15:57 +0100</pubDate>
    <guid isPermaLink="false">http://fseitz.de/blog/index.php?/archives/26-guid.html</guid>
    
</item>
<item>
    <title>Verzeichnisse via rsync abgleichen</title>
    <link>http://fseitz.de/blog/index.php?/archives/18-Verzeichnisse-via-rsync-abgleichen.html</link>
            <category>rsync</category>
    
    <comments>http://fseitz.de/blog/index.php?/archives/18-Verzeichnisse-via-rsync-abgleichen.html#comments</comments>
    <wfw:comment>http://fseitz.de/blog/wfwcomment.php?cid=18</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://fseitz.de/blog/rss.php?version=2.0&amp;type=comments&amp;cid=18</wfw:commentRss>
    

    <author>nospam@example.com (Frank Seitz)</author>
    <content:encoded>
    &lt;h3 class=&quot;s-h3&quot;&gt;Verzeichnisbaum spiegeln (local =&gt; remote)&lt;/h3&gt;

&lt;pre class=&quot;s-pre-box&quot;&gt;
$ rsync -avz --delete &lt;b&gt;&lt;i&gt;dir1/&lt;/i&gt;&lt;/b&gt;&amp;#160;&lt;b&gt;&lt;i&gt;user&lt;/i&gt;&lt;/b&gt;@&lt;b&gt;&lt;i&gt;host&lt;/i&gt;&lt;/b&gt;:&lt;b&gt;&lt;i&gt;dir2&lt;/i&gt;&lt;/b&gt;
&lt;/pre&gt;

&lt;p&gt;
Der trailing Slash bei &lt;code&gt;&lt;i&gt;dir1/&lt;/i&gt;&lt;/code&gt; ist wichtig, da sonst &lt;code&gt;&lt;i&gt;dir1&lt;/i&gt;&lt;/code&gt;
in dir  &lt;code&gt;&lt;i&gt;dir2&lt;/i&gt;&lt;/code&gt; hineinkopiert wird. Die Verzeichnisse können unterschiedlich
heißen.
&lt;/p&gt;

&lt;p&gt;
Bei Angabe der Option &lt;code&gt;-n&lt;/code&gt; wird die Ausführung nur simuliert.
&lt;/p&gt;

&lt;h3 class=&quot;s-h3&quot;&gt;Via ssh&lt;/h3&gt;

&lt;pre class=&quot;s-pre-box&quot;&gt;
$ rsync -e ssh -avz --delete &lt;b&gt;&lt;i&gt;dir1/&lt;/i&gt;&lt;/b&gt;&amp;#160;&lt;b&gt;&lt;i&gt;user&lt;/i&gt;&lt;/b&gt;@&lt;b&gt;&lt;i&gt;host&lt;/i&gt;&lt;/b&gt;:&lt;b&gt;&lt;i&gt;dir2&lt;/i&gt;&lt;/b&gt;
&lt;/pre&gt;

&lt;h3 class=&quot;s-h3&quot;&gt;Via ssh mit speziellem Port&lt;/h3&gt;

&lt;pre class=&quot;s-pre-box&quot;&gt;
$ rsync --rsh=&#039;ssh -p &lt;b&gt;&lt;i&gt;port&lt;/i&gt;&lt;/b&gt;&#039; -avz --delete &lt;b&gt;&lt;i&gt;dir1/&lt;/i&gt;&lt;/b&gt;&amp;#160;&lt;b&gt;&lt;i&gt;user&lt;/i&gt;&lt;/b&gt;@&lt;b&gt;&lt;i&gt;host&lt;/i&gt;&lt;/b&gt;:&lt;b&gt;&lt;i&gt;dir2&lt;/i&gt;&lt;/b&gt;
&lt;/pre&gt;
 
    </content:encoded>

    <pubDate>Thu, 21 Jan 2010 19:26:19 +0100</pubDate>
    <guid isPermaLink="false">http://fseitz.de/blog/index.php?/archives/18-guid.html</guid>
    
</item>

</channel>
</rss>