docs/html/sync-configuration.html

changeset 704
8b88efcbf56f
parent 563
3dffe58a573f
equal deleted inserted replaced
703:2e3a24b9896a 704:8b88efcbf56f
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 1 <!DOCTYPE html>
2 <html xmlns="http://www.w3.org/1999/xhtml"> 2 <html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
3 <head> 3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 4 <meta charset="utf-8" />
5 <meta http-equiv="Content-Style-Type" content="text/css" />
6 <meta name="generator" content="pandoc" /> 5 <meta name="generator" content="pandoc" />
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
7 <title>Configuration</title> 7 <title>Configuration</title>
8 <style type="text/css">code{white-space: pre;}</style> 8 <style type="text/css">
9 <link rel="stylesheet" href="davdoc.css" type="text/css" /> 9 code{white-space: pre-wrap;}
10 span.smallcaps{font-variant: small-caps;}
11 span.underline{text-decoration: underline;}
12 div.column{display: inline-block; vertical-align: top; width: 50%;}
13 </style>
14 <link rel="stylesheet" href="davdoc.css" />
15 <!--[if lt IE 9]>
16 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
17 <![endif]-->
10 </head> 18 </head>
11 <body> 19 <body>
12 <div class="header"> 20 <div class="header">
13 <a href="./index.html"><span>DavUtils documentation</span></a> 21 <a href="./index.html"><span>DavUtils documentation</span></a>
14 </div> 22 </div>
24 <li><a href="put.html">put</a></li> 32 <li><a href="put.html">put</a></li>
25 <li><a href="mkdir.html">mkdir</a></li> 33 <li><a href="mkdir.html">mkdir</a></li>
26 <li><a href="remove.html">remove</a></li> 34 <li><a href="remove.html">remove</a></li>
27 <li><a href="copy.html">copy</a></li> 35 <li><a href="copy.html">copy</a></li>
28 <li><a href="move.html">move</a></li> 36 <li><a href="move.html">move</a></li>
37 <li><a href="rename.html">rename</a></li>
29 <li><a href="export.html">export</a></li> 38 <li><a href="export.html">export</a></li>
30 <li><a href="import.html">import</a></li> 39 <li><a href="import.html">import</a></li>
31 <li><a href="get-property.html">get-property</a></li> 40 <li><a href="get-property.html">get-property</a></li>
32 <li><a href="set-property.html">set-property</a></li> 41 <li><a href="set-property.html">set-property</a></li>
33 <li><a href="remove-property.html">remove-property</a></li> 42 <li><a href="remove-property.html">remove-property</a></li>
34 <li><a href="lock.html">lock</a></li> 43 <li><a href="lock.html">lock</a></li>
35 <li><a href="unlock.html">unlock</a></li> 44 <li><a href="unlock.html">unlock</a></li>
36 <li><a href="info.html">info</a></li> 45 <li><a href="info.html">info</a></li>
37 <li><a href="date.html">date</a></li> 46 <li><a href="date.html">date</a></li>
47 <li><a href="versioncontrol.html">versioncontrol</a></li>
48 <li><a href="list-versions.html">list-versions</a></li>
49 <li><a href="checkout.html">checkout</a></li>
50 <li><a href="checkin.html">checkin</a></li>
51 <li><a href="uncheckout.html">uncheckout</a></li>
38 <li><a href="add-repository.html">add-repository</a></li> 52 <li><a href="add-repository.html">add-repository</a></li>
39 <li><a href="remove-repository.html">remove-repository</a></li> 53 <li><a href="remove-repository.html">remove-repository</a></li>
40 <li><a href="list-repositories.html">list-repositories</a></li> 54 <li><a href="list-repositories.html">list-repositories</a></li>
55 <li><a href="repository-url.html">repository-url</a></li>
56 <li><a href="add-user.html">add-user</a></li>
57 <li><a href="remove-user.html">remove-user</a></li>
58 <li><a href="edit-user.html">edit-user</a></li>
59 <li><a href="list-users.html">list-users</a></li>
41 <li><a href="check-config.html">check-config</a></li> 60 <li><a href="check-config.html">check-config</a></li>
42 </ul> 61 </ul>
43 <li><a href="configuration.html">Configuration</a></li> 62 <li><a href="configuration.html">Configuration</a></li>
44 <li><a href="encryption.html">Encryption</a></li> 63 <li><a href="encryption.html">Encryption</a></li>
45 </ul> 64 </ul>
51 <li><a href="sync-commands.html">Commands</a></li> 70 <li><a href="sync-commands.html">Commands</a></li>
52 <ul> 71 <ul>
53 <li><a href="pull.html">pull</a></li> 72 <li><a href="pull.html">pull</a></li>
54 <li><a href="push.html">push</a></li> 73 <li><a href="push.html">push</a></li>
55 <li><a href="archive.html">archive</a></li> 74 <li><a href="archive.html">archive</a></li>
56 <li><a href="list-conflicts.html">list-conflicts</a></li> 75 <li><a href="restore.html">restore</a></li>
76 <li><a href="list-conflicts.html">list-conflicts</a></li>
57 <li><a href="resolve-conflicts.html">resolve-conflicts</a></li> 77 <li><a href="resolve-conflicts.html">resolve-conflicts</a></li>
58 <li><a href="delete-conflicts.html">delete-conflicts</a></li> 78 <li><a href="delete-conflicts.html">delete-conflicts</a></li>
59 <li><a href="trash-info.html">trash-info</a></li> 79 <li><a href="trash-info.html">trash-info</a></li>
60 <li><a href="empty-trash.html">empty-trash</a></li> 80 <li><a href="empty-trash.html">empty-trash</a></li>
81 <li><a href="list-versions.html">list-versions</a></li>
61 <li><a href="add-tag.html">add-tag</a></li> 82 <li><a href="add-tag.html">add-tag</a></li>
62 <li><a href="remove-tag.html">remove-tag</a></li> 83 <li><a href="remove-tag.html">remove-tag</a></li>
63 <li><a href="set-tags.html">set-tags</a></li> 84 <li><a href="set-tags.html">set-tags</a></li>
64 <li><a href="list-tags.html">list-tags</a></li> 85 <li><a href="list-tags.html">list-tags</a></li>
65 <li><a href="add-directory.html">add-directory</a></li> 86 <li><a href="add-directory.html">add-directory</a></li>
72 </div> 93 </div>
73 </div> 94 </div>
74 95
75 <!-- begin content --> 96 <!-- begin content -->
76 <div class="content"> 97 <div class="content">
77 <div id="header"> 98 <header>
78 <h1 class="title">Configuration</h1> 99 <h1 class="title">Configuration</h1>
79 </div> 100 </header>
80 <p>The file <code>$HOME/.dav/sync.xml</code> is used for configuring sync-directories.</p> 101 <p>The file <code>$HOME/.dav/sync.xml</code> is used for configuring sync-directories.</p>
81 <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> 102 <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>
82 <h2 id="directory">directory</h2> 103 <h2 id="directory">directory</h2>
83 <p>This element configures a sync-directory. A sync-directory must have a unique name, a (local) path, repository and a database.</p> 104 <p>This element configures a sync-directory. A sync-directory must have a unique name, a (local) path, repository and a database.</p>
84 <p>Required elements: <code>&lt;name&gt;</code>, <code>&lt;repository&gt;</code>, <code>&lt;path&gt;</code>, <code>&lt;database&gt;</code><br /> 105 <p>Required elements: <code>&lt;name&gt;</code>, <code>&lt;repository&gt;</code>, <code>&lt;path&gt;</code>, <code>&lt;database&gt;</code><br />
85 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;lock-timeout&gt;</code>, <code>&lt;filter&gt;</code></p> 106 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;lock-timeout&gt;</code>, <code>&lt;filter&gt;</code>, <code>&lt;metadata&gt;</code>, <code>&lt;versioning&gt;</code>, <code>&lt;splitconfig&gt;</code>, <code>&lt;symlink-intern&gt;</code>, <code>&lt;symlink-extern&gt;</code>, <code>&lt;tagconfig&gt;</code>, <code>&lt;allow-cmd&gt;</code></p>
86 <h3 id="name">name</h3> 107 <h3 id="name">name</h3>
87 <p>Unique sync-directory identifer. This identifer is used in combination with all <em>dav-sync</em> commands.</p> 108 <p>Unique sync-directory identifer. This identifer is used in combination with all <em>dav-sync</em> commands.</p>
88 <p>Type: string<br /> 109 <p>Type: string<br />
89 Example: <code>&lt;name&gt;mysyncdir&lt;/name&gt;</code></p> 110 Example: <code>&lt;name&gt;mysyncdir&lt;/name&gt;</code></p>
90 <h3 id="repository">repository</h3> 111 <h3 id="repository">repository</h3>
104 <h3 id="collection">collection</h3> 125 <h3 id="collection">collection</h3>
105 <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> 126 <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>
106 <p>Type: string<br /> 127 <p>Type: string<br />
107 Default: /<br /> 128 Default: /<br />
108 Example: <code>&lt;collection&gt;/myfiles&lt;/collection&gt;</code></p> 129 Example: <code>&lt;collection&gt;/myfiles&lt;/collection&gt;</code></p>
130 <h3 id="hashing">hashing</h3>
131 <p>Enables file hashing. The hash will be used for checking if files are modified and should be synchronized.</p>
132 <p>Type: boolean<br />
133 Default: false<br />
134 Example: <code>&lt;hashing&gt;true&lt;/hashing&gt;</code></p>
109 <h3 id="trash">trash</h3> 135 <h3 id="trash">trash</h3>
110 <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> 136 <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>
111 <p>Type: string<br /> 137 <p>Type: string<br />
112 Example: <code>&lt;trash&gt;.trash&lt;/trash&gt;</code></p> 138 Example: <code>&lt;trash&gt;.trash&lt;/trash&gt;</code></p>
139 <h3 id="push-strategy">push-strategy</h3>
140 <p>Controls the strategy <em>push</em> uses for deciding which files should be pushed. Possible values are: <code>metadata</code> and <code>hash</code>.</p>
141 <p>Type: pushstrategy enum<br />
142 Default: metadata Example: <code>&lt;push-strategy&gt;hash&lt;/push-strategy&gt;</code></p>
113 <h3 id="max-retry">max-retry</h3> 143 <h3 id="max-retry">max-retry</h3>
114 <p>This integer value controls how many attempts of downloading/uploading a file in case of an error are made.</p> 144 <p>This integer value controls how many attempts of downloading/uploading a file in case of an error are made.</p>
115 <p>Type: integer<br /> 145 <p>Type: integer<br />
116 Default: 0<br /> 146 Default: 0<br />
117 Example: <code>&lt;max-retry&gt;3&lt;/max-retry&gt;</code></p> 147 Example: <code>&lt;max-retry&gt;3&lt;/max-retry&gt;</code></p>
129 <p>Enables locking for the <em>push</em> command.</p> 159 <p>Enables locking for the <em>push</em> command.</p>
130 <p>Type: boolean<br /> 160 <p>Type: boolean<br />
131 Default: false<br /> 161 Default: false<br />
132 Example: <code>&lt;lock-push&gt;true&lt;/lock-push&gt;</code></p> 162 Example: <code>&lt;lock-push&gt;true&lt;/lock-push&gt;</code></p>
133 <h3 id="lock-timeout">lock-timeout</h3> 163 <h3 id="lock-timeout">lock-timeout</h3>
134 <p>Specifies the lock timeout in seconds. If the lock-timeout is 0, the client doesn't request a specific timeout and the server's default value is used. If the lock-timeout is -1, a infinite timeout is requested.</p> 164 <p>Specifies the lock timeout in seconds. If the lock-timeout is 0, the client doesn’t request a specific timeout and the server’s default value is used. If the lock-timeout is -1, a infinite timeout is requested.</p>
135 <p>Type: integer<br /> 165 <p>Type: integer<br />
136 Default: 0<br /> 166 Default: 0<br />
137 Example: <code>&lt;lock-timeout&gt;50&lt;/lock-timeout&gt;</code></p> 167 Example: <code>&lt;lock-timeout&gt;50&lt;/lock-timeout&gt;</code></p>
168 <h3 id="metadata">metadata</h3>
169 <p>Controls which file metadata should be synchronized. Possible values are: <code>mtime</code>, <code>mode</code>, <code>xattr</code> and <code>all</code>. If this element is not specified, no metadata will be synchronized.</p>
170 <p>Type: list of metadata<br />
171 Example: <code>&lt;metadata&gt;mtime mode&lt;/metadata&gt;</code></p>
172 <h3 id="versioning">versioning</h3>
173 <p>Enables resource versioning for the commands <em>push</em> and <em>archive</em>.</p>
174 <p>Possible attributes: <code>type</code>, <code>always</code></p>
175 <p>The attribute <code>type</code> sets the versioning method type. Possible values are <code>simple</code> and <code>deltav</code>. With <em>simple</em> versioning, resources are moved to a version history collection before the new content is uploaded. With <em>deltav</em>, the DeltaV methods <em>checkout</em> and <em>checkin</em> are used to store versions. The default value of the <code>type</code> attribute is <code>simple</code>.</p>
176 <p>The boolean attribute <code>always</code> specifies if new versions should be always created. The default value is <code>false</code>.</p>
177 <p>Optional elements: <code>&lt;history&gt;</code> Example: <code>&lt;versioning type=&quot;simple&quot; always=&quot;true&quot; /&gt;</code></p>
178 <h3 id="history">history</h3>
179 <p>Specifies the history collection path for <em>simple</em> versioning. The path is interpreted relatively to the root of the sync directory.</p>
180 <p>Type: string<br />
181 Default: <code>/.dav-version-history</code> Example:</p>
182 <pre><code>&lt;versioning type=&quot;simple&quot;&gt;
183 &lt;history&gt;/.backup/&lt;/history&gt;
184 &lt;/versioning&gt;</code></pre>
185 <h3 id="symlink-intern">symlink-intern</h3>
186 <p>Configures the handling of symlinks, which have a target inside the sync directory. Possible values are: <code>sync</code>, <code>follow</code> and <code>ignore</code>.</p>
187 <p>Type: symlink enum<br />
188 Default: follow<br />
189 Example: <code>&lt;symlink-intern&gt;sync&lt;/symlink-intern&gt;</code></p>
190 <h2 id="symlink-extern">symlink-extern</h2>
191 <p>Configures the handling of symlinks, which have a target outside the sync directory. Possible values are: <code>follow</code> and <code>ignore</code>. Unlike internal symlinks, external symlinks cannot be synced.</p>
192 <p>Type: symlink enum<br />
193 Default: follow<br />
194 Example: <code>&lt;symlink-extern&gt;ignore&lt;/symlink-extern&gt;</code></p>
138 <h3 id="tagconfig">tagconfig</h3> 195 <h3 id="tagconfig">tagconfig</h3>
139 <p>Configures the local store for resource tags. If this element is specified, resource tags are stored locally.</p> 196 <p>Configures the local store for resource tags. If this element is specified, resource tags are stored locally.</p>
140 <p>Optional elements: local-store, detect-changes, xattr-name, on-conflict</p> 197 <p>Optional elements: local-store, detect-changes, xattr-name, on-conflict</p>
141 <h3 id="local-store">local-store</h3> 198 <h3 id="local-store">local-store</h3>
142 <p>Specifies the tag-store type. Currently the only available type is <code>xattr</code>.</p> 199 <p>Specifies the tag-store type. Currently the only available type is <code>xattr</code>.</p>
157 <h3 id="on-conflict">on-conflict</h3> 214 <h3 id="on-conflict">on-conflict</h3>
158 <p>Specifies the behavior, when tag conflicts occur. Possible values are: <code>no_conflict</code>, <code>keep_local</code>, <code>keep_remote</code>, <code>merge</code></p> 215 <p>Specifies the behavior, when tag conflicts occur. Possible values are: <code>no_conflict</code>, <code>keep_local</code>, <code>keep_remote</code>, <code>merge</code></p>
159 <p>Type: onconflict enum<br /> 216 <p>Type: onconflict enum<br />
160 Default: no_conflict<br /> 217 Default: no_conflict<br />
161 Example: <code>&lt;on-conflict&gt;merge&lt;/on-conflict&gt;</code></p> 218 Example: <code>&lt;on-conflict&gt;merge&lt;/on-conflict&gt;</code></p>
219 <h3 id="splitconfig">splitconfig</h3>
220 <p>Parent element for all <code>&lt;split&gt;</code> elements.</p>
221 <h3 id="split">split</h3>
222 <p>Configures if and how files should be splitted into multiple parts on <em>push</em>.</p>
223 <p>The blocksize element configures the size of each part.</p>
224 <p>The elements filter and minsize specify, in which case the files should be splitted.</p>
225 <p>Required elements: <code>&lt;blocksize&gt;</code><br />
226 Optional elements: <code>&lt;filter&gt;</code>, <code>&lt;minsize&gt;</code></p>
227 <p>Example:</p>
228 <pre><code>&lt;splitconfig&gt;
229 &lt;!-- split all files with .vmdk file extension that are bigger than 100mb --&gt;
230 &lt;split&gt;
231 &lt;blocksize&gt;10m&lt;/blocksize&gt;
232 &lt;filter&gt;
233 &lt;include&gt;\.vmdk$&lt;/include&gt;
234 &lt;/filter&gt;
235 &lt;minsize&gt;100m&lt;/minsize&gt;
236 &lt;/split&gt;
237 &lt;/splitconfig&gt;</code></pre>
238 <h3 id="blocksize">blocksize</h3>
239 <p>Specifies the size of each file part.</p>
240 <p>Type: size<br />
241 Example: <code>&lt;blocksize&gt;100k&lt;/blocksize&gt;</code></p>
242 <h3 id="minsize">minsize</h3>
243 <p>Specifies the minimal size a file must have for enabling file splitting.</p>
244 <p>Type: size<br />
245 Default: 0<br />
246 Example: <code>&lt;minsize&gt;100m&lt;/minsize&gt;</code></p>
162 <h3 id="filter">filter</h3> 247 <h3 id="filter">filter</h3>
163 <p>With the filter element, include and exclude filters can be specified, to control which files are synchronized. The <em>pull</em>, <em>push</em> and <em>archive</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> 248 <p>With the filter element, include and exclude filters can be specified, to control which files are synchronized. The <em>pull</em>, <em>push</em> and <em>archive</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>
164 <p>It is also possible to filter resources by tags. Tags can dynamically be applied to individual files. The tag filter elements contains a tag filter expression. Only files that match the filter expression are synchronized.</p> 249 <p>It is also possible to filter resources by tags. Tags can dynamically be applied to individual files. The tag filter elements contains a tag filter expression. Only files that match the filter expression are synchronized.</p>
165 <p>Note: The file path is relative to the directory path (and WebDAV collection) but always starts with an path separator.</p> 250 <p>Note: The file path is relative to the directory path (and WebDAV collection) but always starts with an path separator.</p>
166 <p>Optional elements: <code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code>, <code>&lt;tags&gt;</code></p> 251 <p>Optional elements: <code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code>, <code>&lt;tags&gt;</code></p>

mercurial