docs/html/sync-configuration.html

changeset 285
02d3e4b1245f
parent 283
0e36bb75a732
child 294
dd5c0ebdf54f
equal deleted inserted replaced
284:8e7ef0675946 285:02d3e4b1245f
8 <style type="text/css">code{white-space: pre;}</style> 8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="davdoc.css" type="text/css" /> 9 <link rel="stylesheet" href="davdoc.css" type="text/css" />
10 </head> 10 </head>
11 <body> 11 <body>
12 <div class="header"> 12 <div class="header">
13 <span>davutils documentation</span> 13 <a href="./index.html"><span>DavUtils documentation</span></a>
14 </div> 14 </div>
15 <div class="sidebar"> 15 <div class="sidebar">
16 <div class="nav"> 16 <div class="nav">
17 <h3>dav</h3> 17 <h3>dav</h3>
18 <ul> 18 <ul>
69 </div> 69 </div>
70 <p>The file <code>$HOME/.dav/sync.xml</code> is used for configuring sync-directories.</p> 70 <p>The file <code>$HOME/.dav/sync.xml</code> is used for configuring sync-directories.</p>
71 <p>The <em>sync.xml</em> file is an XML file with <code>&lt;configuration&gt;</code> as root element. This element can only have <code>&lt;directory&gt;</code> elements as children.</p> 71 <p>The <em>sync.xml</em> file is an XML file with <code>&lt;configuration&gt;</code> as root element. This element can only have <code>&lt;directory&gt;</code> elements as children.</p>
72 <h2 id="directory">directory</h2> 72 <h2 id="directory">directory</h2>
73 <p>This element configures a sync-directory. A sync-directory must have a unique name, a (local) path, repository and a database.</p> 73 <p>This element configures a sync-directory. A sync-directory must have a unique name, a (local) path, repository and a database.</p>
74 <p>Required elements: <code>&lt;name&gt;</code>, <code>&lt;repository&gt;</code>, <code>&lt;path&gt;</code>, <code>&lt;database&gt;</code><br /> 74 <p>Required elements: <code>&lt;name&gt;</code>, <code>&lt;repository&gt;</code>, <code>&lt;path&gt;</code>, <code>&lt;database&gt;</code><br />Optional elements: <code>&lt;collection&gt;</code>, <code>&lt;trash&gt;</code>, <code>&lt;max-retry&gt;</code>, <code>&lt;backup-on-pull&gt;</code>, <code>&lt;lock-pull&gt;</code>, <code>&lt;lock-push&gt;</code>, <code>&lt;filter&gt;</code></p>
75 Optional elements: <code>&lt;collection&gt;</code>, <code>&lt;trash&gt;</code>, <code>&lt;max-retry&gt;</code>, <code>&lt;backup-on-pull&gt;</code>, <code>&lt;lock-pull&gt;</code>, <code>&lt;lock-push&gt;</code>, <code>&lt;filter&gt;</code></p>
76 <h3 id="name">name</h3> 75 <h3 id="name">name</h3>
77 <p>Unique sync-directory identifer. This identifer is used in combination with all <em>dav-sync</em> commands.</p> 76 <p>Unique sync-directory identifer. This identifer is used in combination with all <em>dav-sync</em> commands.</p>
78 <p>Type: string<br /> 77 <p>Type: string<br />Example: <code>&lt;name&gt;mysyncdir&lt;/name&gt;</code></p>
79 Example: <code>&lt;name&gt;mysyncdir&lt;/name&gt;</code></p>
80 <h3 id="repository">repository</h3> 78 <h3 id="repository">repository</h3>
81 <p>Name of the WebDAV-repository. A repository with the same name must be configured in [config.xml][1].</p> 79 <p>Name of the WebDAV-repository. A repository with the same name must be configured in [config.xml][1].</p>
82 <p>Type: string<br /> 80 <p>Type: string<br />Example: <code>&lt;name&gt;myrepo&lt;/name&gt;</code></p>
83 Example: <code>&lt;name&gt;myrepo&lt;/name&gt;</code></p>
84 <h3 id="path">path</h3> 81 <h3 id="path">path</h3>
85 <p>The path of the local directory that should be synchronized. The path must be an absolute path or start with an environment variable. A path with an environment variable must start with an <code>$</code> followed by the variable name optionally followed by a path. For example:</p> 82 <p>The path of the local directory that should be synchronized. The path must be an absolute path or start with an environment variable. A path with an environment variable must start with an <code>$</code> followed by the variable name optionally followed by a path. For example:</p>
86 <pre><code>`&lt;path&gt;$HOME/Documents&lt;/path&gt;`</code></pre> 83 <pre><code>`&lt;path&gt;$HOME/Documents&lt;/path&gt;`</code></pre>
87 <p>The part between <code>$</code> and <code>/</code> is the environment variable name.</p> 84 <p>The part between <code>$</code> and <code>/</code> is the environment variable name.</p>
88 <p>Type: string<br /> 85 <p>Type: string<br />Example: <code>&lt;path&gt;/absolute/path&lt;/path&gt;</code></p>
89 Example: <code>&lt;path&gt;/absolute/path&lt;/path&gt;</code></p>
90 <h3 id="database">database</h3> 86 <h3 id="database">database</h3>
91 <p>Path to the database file used for this sync-directory. The path must be relative to the <em>$HOME/.dav/</em> directory.</p> 87 <p>Path to the database file used for this sync-directory. The path must be relative to the <em>$HOME/.dav/</em> directory.</p>
92 <p>Type: string<br /> 88 <p>Type: string<br />Example: <code>&lt;database&gt;myrepo-db.xml&lt;/database&gt;</code></p>
93 Example: <code>&lt;database&gt;myrepo-db.xml&lt;/database&gt;</code></p>
94 <h3 id="collection">collection</h3> 89 <h3 id="collection">collection</h3>
95 <p>Path of the collection relative to the repository root collection. For example if the repository url is <em>http://example.com/webdav/</em> and the collection value is <em>/myfiles/</em>, the directory is synchronized with <em>http://example.com/webdav/myfiles/</em></p> 90 <p>Path of the collection relative to the repository root collection. For example if the repository url is <em>http://example.com/webdav/</em> and the collection value is <em>/myfiles/</em>, the directory is synchronized with <em>http://example.com/webdav/myfiles/</em></p>
96 <p>Type: string<br /> 91 <p>Type: string<br />Default: /<br />Example: <code>&lt;collection&gt;/myfiles&lt;/collection&gt;</code></p>
97 Default: /<br />
98 Example: <code>&lt;collection&gt;/myfiles&lt;/collection&gt;</code></p>
99 <h3 id="trash">trash</h3> 92 <h3 id="trash">trash</h3>
100 <p>Path to the trash directory for this sync-directory. Files that should be deleted will be moved to this directory. The value must be an absolute path or relative to the sync-directory path.</p> 93 <p>Path to the trash directory for this sync-directory. Files that should be deleted will be moved to this directory. The value must be an absolute path or relative to the sync-directory path.</p>
101 <p>Type: string<br /> 94 <p>Type: string<br />Example: <code>&lt;trash&gt;.trash&lt;/trash&gt;</code></p>
102 Example: <code>&lt;trash&gt;.trash&lt;/trash&gt;</code></p>
103 <h3 id="max-retry">max-retry</h3> 95 <h3 id="max-retry">max-retry</h3>
104 <p>This integer value controls how many attempts of downloading/uploading a file in case of an error are made.</p> 96 <p>This integer value controls how many attempts of downloading/uploading a file in case of an error are made.</p>
105 <p>Type: integer<br /> 97 <p>Type: integer<br />Default: 0<br />Example: <code>&lt;max-retry&gt;3&lt;/max-retry&gt;</code></p>
106 Default: 0<br />
107 Example: <code>&lt;max-retry&gt;3&lt;/max-retry&gt;</code></p>
108 <h3 id="backup-on-pull">backup-on-pull</h3> 98 <h3 id="backup-on-pull">backup-on-pull</h3>
109 <p>If this element has the value of true, the <em>pull</em> command will move old local files to the trash directory before downloading the new version from the server.</p> 99 <p>If this element has the value of true, the <em>pull</em> command will move old local files to the trash directory before downloading the new version from the server.</p>
110 <p>Type: boolean<br /> 100 <p>Type: boolean<br />Default: false<br />Example: <code>&lt;backup-on-pull&gt;true&lt;/backup-on-pull&gt;</code></p>
111 Default: false<br />
112 Example: <code>&lt;backup-on-pull&gt;true&lt;/backup-on-pull&gt;</code></p>
113 <h3 id="lock-pull">lock-pull</h3> 101 <h3 id="lock-pull">lock-pull</h3>
114 <p>Enables locking for the <em>pull</em> command.</p> 102 <p>Enables locking for the <em>pull</em> command.</p>
115 <p>Type: boolean<br /> 103 <p>Type: boolean<br />Default: false<br />Example: <code>&lt;lock-pull&gt;true&lt;/lock-pull&gt;</code></p>
116 Default: false<br />
117 Example: <code>&lt;lock-pull&gt;true&lt;/lock-pull&gt;</code></p>
118 <h3 id="lock-push">lock-push</h3> 104 <h3 id="lock-push">lock-push</h3>
119 <p>Enables locking for the <em>push</em> command.</p> 105 <p>Enables locking for the <em>push</em> command.</p>
120 <p>Type: boolean<br /> 106 <p>Type: boolean<br />Default: false<br />Example: <code>&lt;lock-push&gt;true&lt;/lock-push&gt;</code></p>
121 Default: false<br />
122 Example: <code>&lt;lock-push&gt;true&lt;/lock-push&gt;</code></p>
123 <h3 id="filter">filter</h3> 107 <h3 id="filter">filter</h3>
124 <p>With the filter element, include and exclude filters can be specified, to control which files are synchronized. The <em>pull</em> and <em>push</em> command apply these filters to file paths. At first it is checked if a file is matching any include filter. If so only files matching not an exclude filter are further processed.</p> 108 <p>With the filter element, include and exclude filters can be specified, to control which files are synchronized. The <em>pull</em> and <em>push</em> command apply these filters to file paths. At first it is checked if a file is matching any include filter. If so only files matching not an exclude filter are further processed.</p>
125 <p>Note: The file path is relative to the directory path (and WebDAV collection) but always starts with an path separator.</p> 109 <p>Note: The file path is relative to the directory path (and WebDAV collection) but always starts with an path separator.</p>
126 <p>Optional elements: <code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code></p> 110 <p>Optional elements: <code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code></p>
127 <h3 id="include">include</h3> 111 <h3 id="include">include</h3>
128 <p>Controls which files will be included by <em>pull</em> and <em>push</em>. If an include filter is specified, only files matching this filter are included.</p> 112 <p>Controls which files will be included by <em>pull</em> and <em>push</em>. If an include filter is specified, only files matching this filter are included.</p>
129 <p>Type: regex string<br /> 113 <p>Type: regex string<br />Default: .*<br />Example:</p>
130 Default: .*<br />
131 Example:</p>
132 <pre><code>&lt;filter&gt; 114 <pre><code>&lt;filter&gt;
133 &lt;include&gt;\.pdf$&lt;/include&gt; 115 &lt;include&gt;\.pdf$&lt;/include&gt;
134 &lt;/filter&gt;</code></pre> 116 &lt;/filter&gt;</code></pre>
135 <h3 id="exclude">exclude</h3> 117 <h3 id="exclude">exclude</h3>
136 <p>Controls which files will be excluded by <em>pull</em> and <em>push</em>.</p> 118 <p>Controls which files will be excluded by <em>pull</em> and <em>push</em>.</p>
137 <p>Type: regex string<br /> 119 <p>Type: regex string<br />Example:</p>
138 Example:</p>
139 <pre><code>&lt;filter&gt; 120 <pre><code>&lt;filter&gt;
140 &lt;exclude&gt;^/secretdir&lt;/exclude&gt; 121 &lt;exclude&gt;^/secretdir&lt;/exclude&gt;
141 &lt;exclude&gt;\.DS_Store$&lt;/exclude&gt; 122 &lt;exclude&gt;\.DS_Store$&lt;/exclude&gt;
142 &lt;/filter&gt;</code></pre> 123 &lt;/filter&gt;</code></pre>
143 </div> 124 </div>

mercurial